Class: NetSuite::Records::CustomerRefundDepositList
Instance Method Summary
collapse
#record_namespace
#record_type, #to_attributes!
#record_namespace
#attributes, #attributes=, #initialize_from_attributes_hash
included
Constructor Details
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
|