Sha256: defb83dae6c9ed566a6ac6873f12913f549cbf83749c6a6d84a3114d29add8d9

Contents?: true

Size: 1.6 KB

Versions: 17

Compression:

Stored size: 1.6 KB

Contents

module NetSuite
  module Records
    class CustomerPayment
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Support::Actions
      include Namespaces::TranCust

      actions :get, :initialize, :add, :delete

      fields :auth_code, :auto_apply, :cc_approved, :cc_avs_street_match, :cc_avs_zip_match,
        :cc_expire_date, :cc_name, :cc_number, :cc_security_code, :cc_security_code_match, :cc_street, :cc_zip_code,
        :charge_it, :check_num, :created_date, :currency_name, :debit_card_issue_no, :exchange_rate, :ignore_avs,
        :last_modified_date, :memo, :payment, :pending, :pn_ref_num, :status, :three_d_status_code, :tran_date,
        :undep_funds, :valid_from

      field :custom_field_list, CustomFieldList

      read_only_fields :applied, :balance, :total, :unapplied

      record_refs :account, :ar_acct, :credit_card, :credit_card_processor, :custom_form, :customer, :department, :klass,
        :location, :payment_method, :posting_period, :subsidiary

      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

      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

17 entries across 17 versions & 1 rubygems

Version Path
netsuite-0.0.50 lib/netsuite/records/customer_payment.rb
netsuite-0.0.49 lib/netsuite/records/customer_payment.rb
netsuite-0.0.48 lib/netsuite/records/customer_payment.rb
netsuite-0.0.47 lib/netsuite/records/customer_payment.rb
netsuite-0.0.45 lib/netsuite/records/customer_payment.rb
netsuite-0.0.44 lib/netsuite/records/customer_payment.rb
netsuite-0.0.43 lib/netsuite/records/customer_payment.rb
netsuite-0.0.42 lib/netsuite/records/customer_payment.rb
netsuite-0.0.41 lib/netsuite/records/customer_payment.rb
netsuite-0.0.40 lib/netsuite/records/customer_payment.rb
netsuite-0.0.39 lib/netsuite/records/customer_payment.rb
netsuite-0.0.38 lib/netsuite/records/customer_payment.rb
netsuite-0.0.37 lib/netsuite/records/customer_payment.rb
netsuite-0.0.36 lib/netsuite/records/customer_payment.rb
netsuite-0.0.35 lib/netsuite/records/customer_payment.rb
netsuite-0.0.34 lib/netsuite/records/customer_payment.rb
netsuite-0.0.33 lib/netsuite/records/customer_payment.rb