Class: GOBL::Bill::Charge
- Defined in:
- lib/generated/gobl/bill/charge.rb
Overview
Charge represents a surchange applied to the complete document independent from the individual lines.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL Charge structure
'https://gobl.org/draft-0/bill/invoice#/$defs/Charge'
Instance Attribute Summary collapse
-
#amount ⇒ GOBL::Num::Amount
readonly
Amount to apply (calculated if percent present).
-
#base ⇒ GOBL::Num::Amount
readonly
Base represents the value used as a base for percent calculations.
-
#code ⇒ String
readonly
Code for why was this charge applied?.
-
#i ⇒ Integer
readonly
Line number inside the list of discounts (calculated).
-
#key ⇒ GOBL::CBC::Key
readonly
Key for grouping or identifying charges for tax purposes.
-
#meta ⇒ GOBL::CBC::Meta
readonly
Additional semi-structured information.
-
#percent ⇒ GOBL::Num::Percentage
readonly
Percentage to apply to the invoice’s Sum.
-
#reason ⇒ String
readonly
Text description as to why the charge was applied.
-
#ref ⇒ String
readonly
Code to used to refer to the this charge.
-
#taxes ⇒ GOBL::Tax::Set
readonly
List of taxes to apply to the charge.
-
#uuid ⇒ GOBL::UUID::UUID
readonly
Unique identifying for the discount entry.
Method Summary
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#amount ⇒ GOBL::Num::Amount (readonly)
Amount to apply (calculated if percent present)
49 |
# File 'lib/generated/gobl/bill/charge.rb', line 49 property :amount, GOBL::Num::Amount |
#base ⇒ GOBL::Num::Amount (readonly)
Base represents the value used as a base for percent calculations. If not already provided, we’ll take the invoices sum before discounts.
39 |
# File 'lib/generated/gobl/bill/charge.rb', line 39 property :base, GOBL::Num::Amount |
#code ⇒ String (readonly)
Code for why was this charge applied?
59 |
# File 'lib/generated/gobl/bill/charge.rb', line 59 property :code, String |
#i ⇒ Integer (readonly)
Line number inside the list of discounts (calculated).
29 |
# File 'lib/generated/gobl/bill/charge.rb', line 29 property :i, Integer |
#key ⇒ GOBL::CBC::Key (readonly)
Key for grouping or identifying charges for tax purposes.
24 |
# File 'lib/generated/gobl/bill/charge.rb', line 24 property :key, GOBL::CBC::Key |
#meta ⇒ GOBL::CBC::Meta (readonly)
Additional semi-structured information.
69 |
# File 'lib/generated/gobl/bill/charge.rb', line 69 property :meta, GOBL::CBC::Meta |
#percent ⇒ GOBL::Num::Percentage (readonly)
Percentage to apply to the invoice’s Sum
44 |
# File 'lib/generated/gobl/bill/charge.rb', line 44 property :percent, GOBL::Num::Percentage |
#reason ⇒ String (readonly)
Text description as to why the charge was applied
64 |
# File 'lib/generated/gobl/bill/charge.rb', line 64 property :reason, String |
#ref ⇒ String (readonly)
Code to used to refer to the this charge
34 |
# File 'lib/generated/gobl/bill/charge.rb', line 34 property :ref, String |
#taxes ⇒ GOBL::Tax::Set (readonly)
List of taxes to apply to the charge
54 |
# File 'lib/generated/gobl/bill/charge.rb', line 54 property :taxes, GOBL::Tax::Set |
#uuid ⇒ GOBL::UUID::UUID (readonly)
Unique identifying for the discount entry
19 |
# File 'lib/generated/gobl/bill/charge.rb', line 19 property :uuid, GOBL::UUID::UUID |