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/charge'
- KEY_ENUM =
Enumeration of possible values for #key with their corresponding descriptions
{ 'stamp-duty' => 'Stamp Duty', 'outlay' => 'Outlay', 'tax' => 'Tax', 'customs' => 'Customs', 'delivery' => 'Delivery', 'packing' => 'Packing', 'handling' => 'Handling', 'insurance' => 'Insurance', 'storage' => 'Storage', 'admin' => 'Administration', 'cleaning' => 'Cleaning' }.freeze
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 instead of the invoice’s sum of lines.
-
#code ⇒ GOBL::CBC::Code
readonly
Code to used to refer to the this charge by the issuer.
-
#ext ⇒ GOBL::Tax::Extensions
readonly
Extension codes that apply to the charge.
-
#i ⇒ Integer
readonly
Line number inside the list of charges (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 sum of all lines.
-
#reason ⇒ String
readonly
Text description as to why the charge was applied.
-
#taxes ⇒ GOBL::Tax::Set
readonly
List of taxes to apply to the charge.
-
#uuid ⇒ String
readonly
Universally Unique Identifier.
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)
68 |
# File 'lib/generated/gobl/bill/charge.rb', line 68 property :amount, GOBL::Num::Amount |
#base ⇒ GOBL::Num::Amount (readonly)
Base represents the value used as a base for percent calculations instead of the invoice’s sum of lines.
58 |
# File 'lib/generated/gobl/bill/charge.rb', line 58 property :base, GOBL::Num::Amount |
#code ⇒ GOBL::CBC::Code (readonly)
Code to used to refer to the this charge by the issuer
48 |
# File 'lib/generated/gobl/bill/charge.rb', line 48 property :code, GOBL::CBC::Code |
#ext ⇒ GOBL::Tax::Extensions (readonly)
Extension codes that apply to the charge
78 |
# File 'lib/generated/gobl/bill/charge.rb', line 78 property :ext, GOBL::Tax::Extensions |
#i ⇒ Integer (readonly)
Line number inside the list of charges (calculated).
23 |
# File 'lib/generated/gobl/bill/charge.rb', line 23 property :i, Integer |
#key ⇒ GOBL::CBC::Key (readonly)
Key for grouping or identifying charges for tax purposes. A suggested list of keys is provided, but these may be extended by the issuer.
43 |
# File 'lib/generated/gobl/bill/charge.rb', line 43 property :key, GOBL::CBC::Key |
#meta ⇒ GOBL::CBC::Meta (readonly)
Additional semi-structured information.
83 |
# File 'lib/generated/gobl/bill/charge.rb', line 83 property :meta, GOBL::CBC::Meta |
#percent ⇒ GOBL::Num::Percentage (readonly)
Percentage to apply to the sum of all lines
63 |
# File 'lib/generated/gobl/bill/charge.rb', line 63 property :percent, GOBL::Num::Percentage |
#reason ⇒ String (readonly)
Text description as to why the charge was applied
53 |
# File 'lib/generated/gobl/bill/charge.rb', line 53 property :reason, String |
#taxes ⇒ GOBL::Tax::Set (readonly)
List of taxes to apply to the charge
73 |
# File 'lib/generated/gobl/bill/charge.rb', line 73 property :taxes, GOBL::Tax::Set |
#uuid ⇒ String (readonly)
Universally Unique Identifier.
18 |
# File 'lib/generated/gobl/bill/charge.rb', line 18 property :uuid, String |