Class: NetSuite::Records::CustomerRefundDepositList
- Inherits:
-
Object
- Object
- NetSuite::Records::CustomerRefundDepositList
- Includes:
- Namespaces::TranCust, Support::Fields, Support::Records
- Defined in:
- lib/netsuite/records/customer_refund_deposit_list.rb
Instance Method Summary collapse
- #deposits ⇒ Object
-
#initialize(attributes = {}) ⇒ CustomerRefundDepositList
constructor
A new instance of CustomerRefundDepositList.
- #to_record ⇒ Object
Methods included from Namespaces::TranCust
Methods included from Support::Records
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 = {}) ⇒ CustomerRefundDepositList
Returns a new instance of CustomerRefundDepositList.
10 11 12 13 14 15 16 17 18 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 10 def initialize(attributes = {}) initialize_from_attributes_hash(attributes) case attributes[:customer_refund_deposit] when Hash deposits << CustomerRefundDeposit.new(attributes[:customer_refund_deposit]) when Array attributes[:customer_refund_deposit].each { |deposit| deposits << CustomerRefundDeposit.new(deposit) } end end |
Instance Method Details
#deposits ⇒ Object
20 21 22 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 20 def deposits @deposits ||= [] end |
#to_record ⇒ Object
24 25 26 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 24 def to_record super.merge({ "#{record_namespace}:customerRefundDeposit" => deposits.map(&:to_record) }) end |