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.',
  'credit-transfer+sepa' => 'Sender initiated bank or wire transfer via SEPA.',
  '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.',
  'direct-debit+sepa' => 'Direct debit from the customers bank account via SEPA.',
  '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:



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

property :amount, GOBL::Num::Amount

#cardCard (readonly)

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

Returns:



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

property :card, Card

#credit_transferCreditTransfer (readonly)

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

Returns:



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

property :credit_transfer, CreditTransfer

#currencyGOBL::Currency::Code (readonly)

If different from the parent document’s base currency.



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

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)


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

property :description, String

#extGOBL::Tax::Extensions (readonly)

Tax extensions required by tax regimes or addons.



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

property :ext, GOBL::Tax::Extensions

#grantBoolean (readonly)

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

Returns:

  • (Boolean)


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

property :grant, Boolean

#keyGOBL::CBC::Key (readonly)

The payment means used to make the advance.

Returns:



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

property :key, GOBL::CBC::Key

#metaGOBL::CBC::Meta (readonly)

Additional details useful for the parties involved.

Returns:



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

property :meta, GOBL::CBC::Meta

#percentGOBL::Num::Percentage (readonly)

Percentage of the total amount payable that was paid. Note that multiple advances with percentages may lead to rounding errors, especially when the total advances sums to 100%. We recommend only including one advance with a percent value per document.



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

property :percent, GOBL::Num::Percentage

#refString (readonly)

ID or reference for the advance.

Returns:

  • (String)


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

property :ref, String

#uuidString (readonly)

Universally Unique Identifier.

Returns:

  • (String)


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

property :uuid, String