Sha256: e48b268346697f6bf653fb654eabc1fe97ac03f89ed04a4e158950e226498818

Contents?: true

Size: 1.78 KB

Versions: 64

Compression:

Stored size: 1.78 KB

Contents

module NetSuite
  module Records
    class DepositPayment
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Namespaces::TranBank

      # <element name="deposit" type="xsd:boolean" minOccurs="0"/>
      # <element name="id" type="xsd:long" minOccurs="0"/>
      # <element name="docDate" type="xsd:dateTime" minOccurs="0"/>
      # <element name="type" type="xsd:string" minOccurs="0"/>
      # <element name="docNumber" type="xsd:string" minOccurs="0"/>
      # <element name="memo" type="xsd:string" minOccurs="0"/>
      # <element name="paymentMethod" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="refNum" type="xsd:string" minOccurs="0"/>
      # <element name="entity" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="currency" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="transactionAmount" type="xsd:double" minOccurs="0"/>
      # <element name="paymentAmount" type="xsd:double" minOccurs="0"/>

      fields :deposit, :id, :doc_date, :type, :doc_number, :memo, :ref_num, :transaction_amount, :payment_amount

      record_refs :entity, :currency, :payment_method

      def initialize(attributes_or_record = {})
        case attributes_or_record
        when Hash
          initialize_from_attributes_hash(attributes_or_record)
        when self.class
          initialize_from_record(attributes_or_record)
        end
      end

      def initialize_from_record(record)
        self.attributes = record.send(:attributes)
      end

      def to_record
        rec = super
        if rec["#{record_namespace}:customFieldList"]
          rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
        end
        rec
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/records/deposit_payment.rb
netsuite-0.9.2 lib/netsuite/records/deposit_payment.rb
netsuite-0.9.1 lib/netsuite/records/deposit_payment.rb
netsuite-0.9.0 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.12 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.11 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.10 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.9 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.8 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.7 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.6 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.5 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.4 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.3 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.2 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.1 lib/netsuite/records/deposit_payment.rb
netsuite-0.8.0 lib/netsuite/records/deposit_payment.rb
netsuite-0.7.9 lib/netsuite/records/deposit_payment.rb
netsuite-0.7.8 lib/netsuite/records/deposit_payment.rb
netsuite-0.7.7 lib/netsuite/records/deposit_payment.rb