Sha256: 0b0b60fd92e7da4cdd864839642cf8164bc32b118d65d1f125d58250d69b5132

Contents?: true

Size: 1.13 KB

Versions: 11

Compression:

Stored size: 1.13 KB

Contents

module NetSuite
  module Records
    class CustomerCreditCards
      include Support::Fields
      include Support::RecordRefs
      include Support::Records

      # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/schema/other/customercreditcards.html?mode=package

      fields :cc_default, :cc_expire_date, :cc_memo, :cc_name, :cc_number, :debitcard_issue_no, :state_from, :validfrom
      record_refs :card_state, :payment_method

      attr_reader :internal_id

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

      def initialize_from_record(obj)
        self.cc_default = obj.cc_default
        self.cc_expire_date = obj.cc_expire_date
        self.cc_memo = obj.cc_memo
        self.cc_name = obj.cc_name
        self.cc_number = obj.cc_number
        self.debitcard_issue_no = obj.debitcard_issue_no
        self.state_from = obj.state_from
        self.validfrom = obj.validfrom
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.9.2 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.9.1 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.9.0 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.12 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.11 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.10 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.9 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.8 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.7 lib/netsuite/records/customer_credit_cards.rb
netsuite-0.8.6 lib/netsuite/records/customer_credit_cards.rb