Class: NetSuite::Records::DepositPaymentList

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Namespaces::TranBank

#record_namespace

Methods included from Support::Fields

included

Methods included from Support::Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Constructor Details

#initialize(attributes = {}) ⇒ DepositPaymentList

Returns a new instance of DepositPaymentList.



11
12
13
# File 'lib/netsuite/records/deposit_payment_list.rb', line 11

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

Instance Attribute Details

#replace_allObject

Returns the value of attribute replace_all.



7
8
9
# File 'lib/netsuite/records/deposit_payment_list.rb', line 7

def replace_all
  @replace_all
end

Instance Method Details

#payment=(payments) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/netsuite/records/deposit_payment_list.rb', line 15

def payment=(payments)
  case payments
  when Hash
    self.payments << DepositPayment.new(payments)
  when Array
    payments.each { |p| self.payments << DepositPayment.new(p) }
  end
end

#paymentsObject



24
25
26
# File 'lib/netsuite/records/deposit_payment_list.rb', line 24

def payments
  @payments ||= []
end

#to_recordObject



28
29
30
31
32
# File 'lib/netsuite/records/deposit_payment_list.rb', line 28

def to_record
  rec = { "#{record_namespace}:depositPayment" => payments.map(&:to_record) }
  rec[:@replaceAll] = @replace_all unless @replace_all.nil?
  rec
end