Sha256: 362be0986e3133d469fe7e489832ffadae1edd0410da5941708faaf182e3f072

Contents?: true

Size: 640 Bytes

Versions: 14

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

require_relative 'account'
require_relative 'currency'
require_relative 'customer'
require_relative 'invoice_line_item'

module LedgerSync
  module NetSuite
    class Invoice < NetSuite::Resource
      attribute :memo, type: Type::String
      attribute :transaction_date, type: Type::Date
      attribute :deposit, type: Type::Integer

      references_one :customer, to: Customer
      references_one :account, to: Account
      references_one :currency, to: Currency

      references_many :line_items, to: InvoiceLineItem

      def name
        "Invoice: #{transaction_date}"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ledger_sync-netsuite-0.6.2 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.6.1 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.6.0 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.5.0 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.4.2 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.6 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.5 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.4 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.3 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.2 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.1 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.3.0 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.2.0 lib/ledger_sync/netsuite/resources/invoice.rb
ledger_sync-netsuite-0.1.1 lib/ledger_sync/netsuite/resources/invoice.rb