Class: NetSuite::Records::Address
- Inherits:
-
Object
- Object
- NetSuite::Records::Address
- Defined in:
- lib/netsuite/records/address.rb
Instance Method Summary collapse
-
#initialize(attributes_or_record = {}) ⇒ Address
constructor
A new instance of Address.
- #initialize_from_record(obj) ⇒ Object
Methods included from Namespaces::PlatformCommon
Methods included from Support::Records
#record_type, #refresh, #to_attributes!, #to_record
Methods included from Namespaces::PlatformCore
Methods included from Support::Attributes
#attributes, #attributes=, #initialize_from_attributes_hash
Methods included from Support::Fields
Constructor Details
#initialize(attributes_or_record = {}) ⇒ Address
Returns a new instance of Address.
18 19 20 21 22 23 24 25 26 |
# File 'lib/netsuite/records/address.rb', line 18 def initialize(attributes_or_record = {}) case attributes_or_record when self.class initialize_from_record(attributes_or_record) when Hash attributes_or_record = attributes_or_record[:address] if attributes_or_record[:address] initialize_from_attributes_hash(attributes_or_record) end end |
Instance Method Details
#initialize_from_record(obj) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/netsuite/records/address.rb', line 28 def initialize_from_record(obj) self.addr1 = obj.addr1 self.addr2 = obj.addr2 self.addressee = obj.addressee self.addr_phone = obj.addr_phone self.addr_text = obj.addr_text self.attention = obj.attention self.city = obj.city self.country = obj.country self.custom_field_list = obj.custom_field_list self.internal_id = obj.internal_id self.override = obj.override self.state = obj.state self.zip = obj.zip end |