Class: GOBL::Pay::Advance

Inherits:
Object show all
Defined in:
lib/generated/gobl/pay/advance.rb

Overview

Advance represents a single payment that has been made already, such as a deposit on an intent to purchase, or as credit from a previous invoice which was later corrected or cancelled.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Advance structure

'https://gobl.org/draft-0/pay/advance'
KEY_ENUM =

Enumeration of possible values for #key with their corresponding descriptions

{
  'any' => 'Any method available, no preference.',
  'card' => 'Payment card.',
  'credit-transfer' => 'Sender initiated bank or wire transfer.',
  'debit-transfer' => 'Receiver initiated bank or wire transfer.',
  'cash' => 'Cash in hand.',
  'cheque' => 'Cheque from bank.',
  'bank-draft' => 'Bankers Draft or Bank Cheque.',
  'direct-debit' => 'Direct debit from the customers bank account.',
  'online' => 'Online or web payment.',
  'promissory-note' => 'Promissory note contract.',
  'netting' => 'Intercompany clearing or clearing between partners.',
  'other' => 'Other or mutually defined means of payment.'
}.freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#amountGOBL::Num::Amount (readonly)

How much was paid.

Returns:



70
# File 'lib/generated/gobl/pay/advance.rb', line 70

property :amount, GOBL::Num::Amount

#cardCard (readonly)

Details of the payment that was made via a credit or debit card.

Returns:



81
# File 'lib/generated/gobl/pay/advance.rb', line 81

property :card, Card

#credit_transferCreditTransfer (readonly)

Details about how the payment was made by credit (bank) transfer.

Returns:



86
# File 'lib/generated/gobl/pay/advance.rb', line 86

property :credit_transfer, CreditTransfer

#currencyGOBL::Currency::Code (readonly)

If different from the parent document’s base currency.



76
# File 'lib/generated/gobl/pay/advance.rb', line 76

property :currency, GOBL::Currency::Code

#dateGOBL::Cal::Date (readonly)

When the advance was made.

Returns:



23
# File 'lib/generated/gobl/pay/advance.rb', line 23

property :date, GOBL::Cal::Date

#descriptionString (readonly)

Details about the advance.

Returns:

  • (String)


59
# File 'lib/generated/gobl/pay/advance.rb', line 59

property :description, String

#grantBoolean (readonly)

If this “advance” payment has come from a public grant or subsidy, set this to true.

Returns:

  • (Boolean)


54
# File 'lib/generated/gobl/pay/advance.rb', line 54

property :grant, Boolean

#keyGOBL::CBC::Key (readonly)

The payment means used to make the advance.

Returns:



44
# File 'lib/generated/gobl/pay/advance.rb', line 44

property :key, GOBL::CBC::Key

#metaGOBL::CBC::Meta (readonly)

Additional details useful for the parties involved.

Returns:



91
# File 'lib/generated/gobl/pay/advance.rb', line 91

property :meta, GOBL::CBC::Meta

#percentGOBL::Num::Percentage (readonly)

How much as a percentage of the total with tax was paid



65
# File 'lib/generated/gobl/pay/advance.rb', line 65

property :percent, GOBL::Num::Percentage

#refString (readonly)

ID or reference for the advance.

Returns:

  • (String)


49
# File 'lib/generated/gobl/pay/advance.rb', line 49

property :ref, String

#uuidString (readonly)

Universally Unique Identifier.

Returns:

  • (String)


18
# File 'lib/generated/gobl/pay/advance.rb', line 18

property :uuid, String