Class: GOBL::Pay::Advance

Inherits:
Object show all
Defined in:
lib/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'

Constants included from Hashme

Hashme::Boolean

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:



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

property :amount, GOBL::Num::Amount

#currencyGOBL::Currency::Code (readonly)

If different from the parent document’s base currency.



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

property :currency, GOBL::Currency::Code

#dateGOBL::Cal::Date (readonly)

When the advance was made.

Returns:



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

property :date, GOBL::Cal::Date

#descString (readonly)

Details about the advance.

Returns:

  • (String)


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

property :desc, String

#grantBoolean (readonly)

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

Returns:



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

property :grant, Boolean

#percentGOBL::Num::Percentage (readonly)

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



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

property :percent, GOBL::Num::Percentage

#refString (readonly)

ID or reference for the advance.

Returns:

  • (String)


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

property :ref, String

#uuidGOBL::UUID::UUID (readonly)

Unique identifier for this advance.

Returns:



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

property :uuid, GOBL::UUID::UUID