Method: BeeiqAPI::Contact#initialize
- Defined in:
- lib/beeiq_api/contact.rb
#initialize(options = {}) ⇒ Contact
Returns a new instance of Contact.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/beeiq_api/contact.rb', line 18 def initialize( = {}) @contact_type = [:contact_type] || Config::ContactType::CUSTOMER @name = [:name] @lastname = [:lastname] @title = [:title] @passport = [:passport] @gender = [:gender] @date_of_birth = [:date_of_birth] @emails = [:emails] @phones = [:phones] @addresses = [:addresses] @im = [:im] @tag = [:tag] @cus_fields = [:cus_fields] @company_contact = [:company_contact] raise ArgumentError, 'name is required' if @name.to_s.empty? end |