Class: GOBL::Tax::Category

Inherits:
Object show all
Defined in:
lib/generated/gobl/tax/category.rb

Overview

Category contains the definition of a general type of tax inside a region.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Category structure

'https://gobl.org/draft-0/tax/regime#/$defs/Category'

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

#codeGOBL::CBC::Code (readonly)

Code to be used in documents

Returns:



18
# File 'lib/generated/gobl/tax/category.rb', line 18

property :code, GOBL::CBC::Code

#descGOBL::I18n::String (readonly)

Useful description of the category.

Returns:



35
# File 'lib/generated/gobl/tax/category.rb', line 35

property :desc, GOBL::I18n::String

#extensionsArray<GOBL::CBC::Key> (readonly)

Extensions defines a list of extension keys that may be used or required as an alternative or alongside choosing a rate for the tax category. Every key must be defined in the Regime’s extensions table.

Returns:



55
# File 'lib/generated/gobl/tax/category.rb', line 55

property :extensions, [GOBL::CBC::Key]

#mapGOBL::CBC::CodeMap (readonly)

Map defines a set of regime specific code mappings.

Returns:



60
# File 'lib/generated/gobl/tax/category.rb', line 60

property :map, GOBL::CBC::CodeMap

#metaGOBL::CBC::Meta (readonly)

Meta contains additional information about the category that is relevant for local frequently used formats.

Returns:



70
# File 'lib/generated/gobl/tax/category.rb', line 70

property :meta, GOBL::CBC::Meta

#nameGOBL::I18n::String (readonly)

Short name of the category to be used instead of code in output

Returns:



24
# File 'lib/generated/gobl/tax/category.rb', line 24

property :name, GOBL::I18n::String

#rate_requiredBoolean (readonly)

RateRequired when true implies that when a tax combo is defined using this category that one of the rate’s keys must be defined. This is normally needed for regimes that categorize taxes in local document formats as opposed to grouping by percentage values. Try to avoid using this. It is better for rates to be determined by the percentage and conditions, not the rate key.

Returns:

  • (Boolean)


45
# File 'lib/generated/gobl/tax/category.rb', line 45

property :rate_required, Boolean

#ratesArray<Rate> (readonly)

Specific tax definitions inside this category.

Returns:



50
# File 'lib/generated/gobl/tax/category.rb', line 50

property :rates, [Rate]

#retainedBoolean (readonly)

Retained when true implies that the tax amount will be retained by the buyer on behalf of the supplier, and thus subtracted from the invoice taxable base total. Typically used for taxes related to income.

Returns:

  • (Boolean)


40
# File 'lib/generated/gobl/tax/category.rb', line 40

property :retained, Boolean

#sourcesArray<Source> (readonly)

List of sources for the information contained in this category.

Returns:



65
# File 'lib/generated/gobl/tax/category.rb', line 65

property :sources, [Source]

#titleGOBL::I18n::String (readonly)

Human name for the code to use for titles

Returns:



30
# File 'lib/generated/gobl/tax/category.rb', line 30

property :title, GOBL::I18n::String