Class: NetSuite::Records::DepositPaymentList
- Inherits:
-
Object
- Object
- NetSuite::Records::DepositPaymentList
- Includes:
- Namespaces::TranBank, Support::Fields
- Defined in:
- lib/netsuite/records/deposit_payment_list.rb
Instance Attribute Summary collapse
-
#replace_all ⇒ Object
Returns the value of attribute replace_all.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DepositPaymentList
constructor
A new instance of DepositPaymentList.
- #payment=(payments) ⇒ Object
- #payments ⇒ Object
- #to_record ⇒ Object
Methods included from Namespaces::TranBank
Methods included from Support::Fields
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_all ⇒ Object
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 |
#payments ⇒ Object
24 25 26 |
# File 'lib/netsuite/records/deposit_payment_list.rb', line 24 def payments @payments ||= [] end |
#to_record ⇒ Object
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 |