Class: NetSuite::Records::CustomerRefundApplyList
- Inherits:
-
Object
- Object
- NetSuite::Records::CustomerRefundApplyList
- Includes:
- Namespaces::TranCust
- Defined in:
- lib/netsuite/records/customer_refund_apply_list.rb
Instance Attribute Summary collapse
-
#replace_all ⇒ Object
TODO should use new sublist implementation.
Instance Method Summary collapse
- #applies ⇒ Object
-
#initialize(attributes = {}) ⇒ CustomerRefundApplyList
constructor
A new instance of CustomerRefundApplyList.
- #to_record ⇒ Object
Methods included from Namespaces::TranCust
Constructor Details
#initialize(attributes = {}) ⇒ CustomerRefundApplyList
Returns a new instance of CustomerRefundApplyList.
10 11 12 13 14 15 16 17 |
# File 'lib/netsuite/records/customer_refund_apply_list.rb', line 10 def initialize(attributes = {}) case attributes[:apply] when Hash applies << CustomerRefundApply.new(attributes[:apply]) when Array attributes[:apply].each { |apply| applies << CustomerRefundApply.new(apply) } end end |
Instance Attribute Details
#replace_all ⇒ Object
TODO should use new sublist implementation
8 9 10 |
# File 'lib/netsuite/records/customer_refund_apply_list.rb', line 8 def replace_all @replace_all end |
Instance Method Details
#applies ⇒ Object
19 20 21 |
# File 'lib/netsuite/records/customer_refund_apply_list.rb', line 19 def applies @applies ||= [] end |
#to_record ⇒ Object
23 24 25 26 27 |
# File 'lib/netsuite/records/customer_refund_apply_list.rb', line 23 def to_record rec = { "#{record_namespace}:apply" => applies.map(&:to_record) } rec[:@replaceAll] = @replace_all unless @replace_all.nil? rec end |