Class: NetSuite::Records::CustomerPaymentApplyList

Inherits:
Object
  • Object
show all
Includes:
Namespaces::TranCust, Support::Fields
Defined in:
lib/netsuite/records/customer_payment_apply_list.rb

Instance Method Summary collapse

Methods included from Namespaces::TranCust

#record_namespace

Methods included from Support::Fields

included

Methods included from Support::Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Constructor Details

#initialize(attributes = {}) ⇒ CustomerPaymentApplyList

Returns a new instance of CustomerPaymentApplyList.



9
10
11
# File 'lib/netsuite/records/customer_payment_apply_list.rb', line 9

def initialize(attributes = {})
  initialize_from_attributes_hash(attributes)
end

Instance Method Details

#appliesObject



22
23
24
# File 'lib/netsuite/records/customer_payment_apply_list.rb', line 22

def applies
  @applies ||= []
end

#apply=(applies) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/netsuite/records/customer_payment_apply_list.rb', line 13

def apply=(applies)
  case applies
    when Hash
      self.applies << CustomerPaymentApply.new(applies)
    when Array
      applies.each { |apply| self.applies << CustomerPaymentApply.new(apply) }
  end
end

#to_recordObject



26
27
28
# File 'lib/netsuite/records/customer_payment_apply_list.rb', line 26

def to_record
  { "#{record_namespace}:apply" => applies.map(&:to_record) }
end