Class: NetSuite::Records::CustomerAddressbook
- Inherits:
-
Object
- Object
- NetSuite::Records::CustomerAddressbook
- Includes:
- Namespaces::ListRel, Support::Fields, Support::Records
- Defined in:
- lib/netsuite/records/customer_addressbook.rb
Instance Attribute Summary collapse
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#internal_id ⇒ Object
readonly
Returns the value of attribute internal_id.
Instance Method Summary collapse
-
#initialize(attributes_or_record = {}) ⇒ CustomerAddressbook
constructor
A new instance of CustomerAddressbook.
- #initialize_from_record(obj) ⇒ Object
Methods included from Namespaces::ListRel
Methods included from Support::Records
#record_type, #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 = {}) ⇒ CustomerAddressbook
Returns a new instance of CustomerAddressbook.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/netsuite/records/customer_addressbook.rb', line 14 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[:addressbook] if attributes_or_record[:addressbook] @internal_id = attributes_or_record.delete(:internal_id) initialize_from_attributes_hash(attributes_or_record) end end |
Instance Attribute Details
#external_id ⇒ Object
Returns the value of attribute external_id.
12 13 14 |
# File 'lib/netsuite/records/customer_addressbook.rb', line 12 def external_id @external_id end |
#internal_id ⇒ Object (readonly)
Returns the value of attribute internal_id.
11 12 13 |
# File 'lib/netsuite/records/customer_addressbook.rb', line 11 def internal_id @internal_id end |
Instance Method Details
#initialize_from_record(obj) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/netsuite/records/customer_addressbook.rb', line 25 def initialize_from_record(obj) self.default_shipping = obj.default_shipping self.default_billing = obj.default_billing self.is_residential = obj.is_residential self.label = obj.label self.attention = obj.attention self.addressee = obj.addressee self.phone = obj.phone self.addr1 = obj.addr1 self.addr2 = obj.addr2 self.addr3 = obj.addr3 self.city = obj.city self.zip = obj.zip self.country = obj.country self.addr_text = obj.addr_text self.override = obj.override self.state = obj.state @internal_id = obj.internal_id end |