Ruby/Highrise API - 不保存电话号码?
问题描述:
所以我一直在使用这个相同的代码块约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
答
@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"}}] })
希望它有帮助