Sha256: 12d267f668814a4f4fadf80dc9b24d03be8afd2d20b785def04de853768c2c2f

Contents?: true

Size: 1.56 KB

Versions: 45

Compression:

Stored size: 1.56 KB

Contents

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

      # <element name="entity" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="amount" type="xsd:double" minOccurs="0"/>
      # <element name="account" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="paymentMethod" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="refNum" type="xsd:string" minOccurs="0"/>
      # <element name="department" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="class" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="location" type="platformCore:RecordRef" minOccurs="0"/>
      # <element name="memo" type="xsd:string" minOccurs="0"/>

      fields :amount, :ref_num, :memo

      record_refs :entity, :account, :payment_method, :department, :klass, :location

      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

45 entries across 45 versions & 1 rubygems

Version Path
netsuite-0.8.0 lib/netsuite/records/deposit_other.rb
netsuite-0.7.9 lib/netsuite/records/deposit_other.rb
netsuite-0.7.8 lib/netsuite/records/deposit_other.rb
netsuite-0.7.7 lib/netsuite/records/deposit_other.rb
netsuite-0.7.6 lib/netsuite/records/deposit_other.rb
netsuite-0.7.5 lib/netsuite/records/deposit_other.rb
netsuite-0.7.4 lib/netsuite/records/deposit_other.rb
netsuite-0.7.3 lib/netsuite/records/deposit_other.rb
netsuite-0.7.2 lib/netsuite/records/deposit_other.rb
netsuite-0.7.1 lib/netsuite/records/deposit_other.rb
netsuite-0.7.0 lib/netsuite/records/deposit_other.rb
netsuite-0.6.9 lib/netsuite/records/deposit_other.rb
netsuite-0.6.8 lib/netsuite/records/deposit_other.rb
netsuite-0.6.7 lib/netsuite/records/deposit_other.rb
netsuite-0.6.6 lib/netsuite/records/deposit_other.rb
netsuite-0.6.5 lib/netsuite/records/deposit_other.rb
netsuite-0.6.4 lib/netsuite/records/deposit_other.rb
netsuite-0.6.3 lib/netsuite/records/deposit_other.rb
netsuite-0.6.2 lib/netsuite/records/deposit_other.rb
netsuite-0.6.1 lib/netsuite/records/deposit_other.rb