2016-01-24 40 views
1

所以我一直在使用這個相同的代碼塊約9個月,突然它已經停止將一個電話號碼保存到Highrise當一個新的線索產生...任何想法的東西側身?我從來不會拋出錯誤,並且樂意保存除電話號碼以外的所有聯繫人。Ruby/Highrise API - 不保存電話號碼?

# 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 

回答

0
@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"}}] }) 

希望它有幫助