So I've been using this same block of code for about 9 months and suddenly it has stopped saving a phone number into Highrise when a new Lead is generated... Any idea where things are going sideways? I never throws an error and happily saves the contact with everything except for the telephone number.
# create a contact Highrise from supplied information
@person = Highrise::Person.new(first_name: @lead.first_name.humanize,
last_name: @lead.last_name.humanize,
background: "automatically created by LSAL app",
contact_data: { email_addresses: [ { address: @lead.email, location: "Home" } ],
phones: [ { number: @lead.phone, location: "Mobile" } ] } )
@person.save # save contact
@person = Highrise::Person.create(:company_name => account.company, :first_name => account.first_name, :last_name => account.last_name, :contact_data => { :email_addresses => [{ :email_address => {:address => account.email, } }], :addresses => [{:address => {:city => account.city, :location =>"Work", :state => account.state, :country => account.country,:street => "#{account.address1} #{account.address2}" , :zip => account.zip} }], :phone_numbers => [{ :phone_number => { :number => number, :location =>"Work"}}] } )
Hope its helpful