Sha256: ef260f69dbf8931a30e155aa7dc4d149c42ecf6644a942c8284443b0ea6027ef

Contents?: true

Size: 797 Bytes

Versions: 15

Compression:

Stored size: 797 Bytes

Contents

module NetSuite
  module Records
    class CustomerRefundDepositList
      include Support::Fields
      include Support::Records
      include Namespaces::TranCust
 
      fields :replace_all
 
      def initialize(attributes = {})
        initialize_from_attributes_hash(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
 
      def deposits
        @deposits ||= []
      end
 
      def to_record
        super.merge({ "#{record_namespace}:customerRefundDeposit" => deposits.map(&:to_record) })
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
netsuite-0.5.4 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.5.3 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.5.2 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.5.1 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.5.0 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.9 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.8 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.7 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.6 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.5 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.4 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.3 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.2 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.1 lib/netsuite/records/customer_refund_deposit_list.rb
netsuite-0.4.0 lib/netsuite/records/customer_refund_deposit_list.rb