Class: GOBL::Tax::RateTotal
- Defined in:
- lib/generated/gobl/tax/rate_total.rb
Overview
RateTotal contains a sum of all the tax rates in the document with a matching category and rate.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL RateTotal structure
'https://gobl.org/draft-0/tax/total#/$defs/RateTotal'
Instance Attribute Summary collapse
-
#amount ⇒ GOBL::Num::Amount
readonly
Total amount of rate, excluding surcharges.
-
#base ⇒ GOBL::Num::Amount
readonly
Base amount that the percentage is applied to.
-
#country ⇒ GOBL::L10n::TaxCountryCode
readonly
Country code override when issuing with taxes applied from different countries, it’d be very strange to mix rates from different countries, but in theory this would be possible.
-
#ext ⇒ GOBL::Tax::Extensions
readonly
If the rate is defined with extensions, they’ll be used to group by also.
-
#key ⇒ GOBL::CBC::Key
readonly
Optional rate key is required when grouping.
-
#percent ⇒ GOBL::Num::Percentage
readonly
Percentage of the rate.
-
#surcharge ⇒ RateTotalSurcharge
readonly
Surcharge applied to the rate.
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)
Total amount of rate, excluding surcharges
49 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 49 property :amount, GOBL::Num::Amount |
#base ⇒ GOBL::Num::Amount (readonly)
Base amount that the percentage is applied to.
33 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 33 property :base, GOBL::Num::Amount |
#country ⇒ GOBL::L10n::TaxCountryCode (readonly)
Country code override when issuing with taxes applied from different countries, it’d be very strange to mix rates from different countries, but in theory this would be possible.
23 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 23 property :country, GOBL::L10n::TaxCountryCode |
#ext ⇒ GOBL::Tax::Extensions (readonly)
If the rate is defined with extensions, they’ll be used to group by also.
28 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 28 property :ext, GOBL::Tax::Extensions |
#key ⇒ GOBL::CBC::Key (readonly)
Optional rate key is required when grouping.
18 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 18 property :key, GOBL::CBC::Key |
#percent ⇒ GOBL::Num::Percentage (readonly)
Percentage of the rate. Will be nil when taxes are exempt.
39 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 39 property :percent, GOBL::Num::Percentage |
#surcharge ⇒ RateTotalSurcharge (readonly)
Surcharge applied to the rate.
44 |
# File 'lib/generated/gobl/tax/rate_total.rb', line 44 property :surcharge, RateTotalSurcharge |