Sha256: 52a417e1c3d2b3a91543d84daf335a210968e83a50a40d90389502a6c753d5ed

Contents?: true

Size: 599 Bytes

Versions: 1

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

require_relative 'account'
require_relative 'bill_line_item'
require_relative 'vendor'

module LedgerSync
  class Bill < LedgerSync::Resource
    attribute :currency, type: Type::String
    attribute :memo, type: Type::String
    attribute :transaction_date, type: Type::Date
    attribute :due_date, type: Type::Date
    attribute :reference_number, type: Type::String

    references_one :vendor, to: Vendor
    references_one :account, to: Account

    references_many :line_items, to: BillLineItem

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledger_sync-1.3.1 lib/ledger_sync/resources/bill.rb