Sha256: 21e1c5ebc204717b535977a04230980cf3c41a128528c5c743024efde514a640

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

module NetSuite
  module Records
    # Adding a Customer Deposit example. The customer associated with the sales
    # order would be linked to the deposit.
    #
    #   deposit = CustomerDeposit.new
    #   deposit.sales_order = RecordRef.new(internal_id: 7279)
    #   deposit.payment = 20
    #   deposit.add
    #
    class CustomerDeposit
      include Support::Actions
      include Support::RecordRefs
      include Support::Fields
      include Support::Records
      include Namespaces::TranCust

      actions :add, :get, :upsert

      fields :custom_form, :payment, :tran_date, :exchange_rate, :undep_funds, :memo,
             :check_num

      record_refs :customer, :sales_order, :account

      attr_reader :internal_id
      attr_accessor :external_id

      def initialize(attributes = {})
        @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
        @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
        initialize_from_attributes_hash(attributes)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
netsuite-0.4.5 lib/netsuite/records/customer_deposit.rb
netsuite-0.4.4 lib/netsuite/records/customer_deposit.rb
netsuite-0.4.3 lib/netsuite/records/customer_deposit.rb
netsuite-0.4.2 lib/netsuite/records/customer_deposit.rb
netsuite-0.4.1 lib/netsuite/records/customer_deposit.rb
netsuite-0.4.0 lib/netsuite/records/customer_deposit.rb
netsuite-0.3.3 lib/netsuite/records/customer_deposit.rb
netsuite-0.3.2 lib/netsuite/records/customer_deposit.rb
netsuite-0.3.1 lib/netsuite/records/customer_deposit.rb
netsuite-0.3.0 lib/netsuite/records/customer_deposit.rb