Sha256: 6383579d5f1fabb75df2475f5f4b92c88cfbe326430005654992b6b3e4cbe49e

Contents?: true

Size: 691 Bytes

Versions: 8

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

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

module LedgerSync
  module Ledgers
    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
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.4.4 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/netsuite/resources/invoice.rb