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:



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

property :amount, GOBL::Num::Amount

#currencyGOBL::Currency::Code (readonly)

If different from the parent document’s base currency.



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

property :currency, GOBL::Currency::Code

#dateGOBL::Cal::Date (readonly)

When the advance was made.

Returns:



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

property :date, GOBL::Cal::Date

#descString (readonly)

Details about the advance.

Returns:

  • (String)


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

property :desc, String

#grantBoolean (readonly)

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

Returns:

  • (Boolean)


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

property :grant, Boolean

#keyGOBL::CBC::Key (readonly)

The payment means used to make the advance.

Returns:



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

property :key, GOBL::CBC::Key

#percentGOBL::Num::Percentage (readonly)

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



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

property :percent, GOBL::Num::Percentage

#refString (readonly)

ID or reference for the advance.

Returns:

  • (String)


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

property :ref, String

#uuidGOBL::UUID::UUID (readonly)

Unique identifier for this advance.

Returns:



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

property :uuid, GOBL::UUID::UUID