Class: NetSuite::Records::CustomerRefundDepositList
- Inherits:
-
Object
- Object
- NetSuite::Records::CustomerRefundDepositList
- Includes:
- Namespaces::TranCust, 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
Constructor Details
#initialize(attributes = {}) ⇒ CustomerRefundDepositList
Returns a new instance of CustomerRefundDepositList.
7 8 9 10 11 12 13 14 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 7 def initialize(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
16 17 18 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 16 def deposits @deposits ||= [] end |
#to_record ⇒ Object
20 21 22 23 24 |
# File 'lib/netsuite/records/customer_refund_deposit_list.rb', line 20 def to_record deposits.map do |deposit| { "#{record_namespace}:customerRefundDeposit" => deposit.to_record } end end |