gobl 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/data/regimes/at.json +160 -0
- data/data/regimes/be.json +169 -0
- data/data/regimes/ca.json +10 -1
- data/data/regimes/ch.json +158 -0
- data/data/regimes/co.json +179 -169
- data/data/regimes/de.json +63 -49
- data/data/regimes/el.json +204 -0
- data/data/regimes/es.json +84 -557
- data/data/regimes/fr.json +57 -52
- data/data/regimes/gb.json +67 -50
- data/data/regimes/gr.json +591 -0
- data/data/regimes/it.json +62 -1298
- data/data/regimes/mx.json +38 -627
- data/data/regimes/nl.json +63 -50
- data/data/regimes/pl.json +161 -101
- data/data/regimes/pt.json +44 -365
- data/data/regimes/us.json +63 -49
- data/lib/generated/gobl/bill/charge.rb +6 -7
- data/lib/generated/gobl/bill/correction_options.rb +5 -1
- data/lib/generated/gobl/bill/delivery.rb +0 -1
- data/lib/generated/gobl/bill/discount.rb +5 -6
- data/lib/generated/gobl/bill/invoice.rb +51 -12
- data/lib/generated/gobl/bill/line.rb +3 -4
- data/lib/generated/gobl/bill/line_charge.rb +0 -1
- data/lib/generated/gobl/bill/line_discount.rb +0 -1
- data/lib/generated/gobl/bill/ordering.rb +34 -35
- data/lib/generated/gobl/bill/outlay.rb +3 -4
- data/lib/generated/gobl/bill/payment.rb +0 -1
- data/lib/generated/gobl/bill/tax.rb +4 -5
- data/lib/generated/gobl/bill/totals.rb +0 -1
- data/lib/generated/gobl/cal/date.rb +0 -1
- data/lib/generated/gobl/cal/date_time.rb +0 -1
- data/lib/generated/gobl/cal/period.rb +0 -1
- data/lib/generated/gobl/cbc/code.rb +0 -1
- data/lib/generated/gobl/cbc/code_map.rb +0 -1
- data/lib/generated/gobl/cbc/key.rb +0 -1
- data/lib/generated/gobl/cbc/key_definition.rb +4 -10
- data/lib/generated/gobl/cbc/meta.rb +0 -1
- data/lib/generated/gobl/cbc/note.rb +0 -1
- data/lib/generated/gobl/cbc/value_definition.rb +37 -0
- data/lib/generated/gobl/currency/amount.rb +33 -0
- data/lib/generated/gobl/currency/code.rb +118 -105
- data/lib/generated/gobl/currency/exchange_rate.rb +17 -7
- data/lib/generated/gobl/dsig/digest.rb +0 -1
- data/lib/generated/gobl/dsig/signature.rb +0 -1
- data/lib/generated/gobl/envelope.rb +0 -1
- data/lib/generated/gobl/head/header.rb +7 -8
- data/lib/generated/gobl/head/link.rb +43 -0
- data/lib/generated/gobl/head/stamp.rb +0 -1
- data/lib/generated/gobl/i18n/string.rb +0 -1
- data/lib/generated/gobl/l10n/code.rb +0 -1
- data/lib/generated/gobl/l10n/{country_code.rb → iso_country_code.rb} +3 -4
- data/lib/generated/gobl/l10n/tax_country_code.rb +277 -0
- data/lib/generated/gobl/note/message.rb +5 -1
- data/lib/generated/gobl/org/address.rb +5 -7
- data/lib/generated/gobl/org/coordinates.rb +0 -1
- data/lib/generated/gobl/org/document_ref.rb +87 -0
- data/lib/generated/gobl/org/email.rb +3 -4
- data/lib/generated/gobl/org/identity.rb +8 -4
- data/lib/generated/gobl/org/image.rb +3 -4
- data/lib/generated/gobl/org/inbox.rb +3 -4
- data/lib/generated/gobl/org/item.rb +10 -6
- data/lib/generated/gobl/org/name.rb +3 -6
- data/lib/generated/gobl/org/party.rb +8 -5
- data/lib/generated/gobl/org/person.rb +8 -4
- data/lib/generated/gobl/org/registration.rb +11 -3
- data/lib/generated/gobl/org/telephone.rb +3 -4
- data/lib/generated/gobl/org/unit.rb +0 -1
- data/lib/generated/gobl/org/website.rb +4 -5
- data/lib/generated/gobl/pay/advance.rb +8 -4
- data/lib/generated/gobl/pay/card.rb +0 -1
- data/lib/generated/gobl/pay/credit_transfer.rb +0 -1
- data/lib/generated/gobl/pay/direct_debit.rb +0 -1
- data/lib/generated/gobl/pay/due_date.rb +0 -1
- data/lib/generated/gobl/pay/instructions.rb +5 -1
- data/lib/generated/gobl/pay/online.rb +12 -8
- data/lib/generated/gobl/pay/terms.rb +0 -1
- data/lib/generated/gobl/regimes/mx/food_vouchers.rb +0 -1
- data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +0 -1
- data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +0 -1
- data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +0 -1
- data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +0 -1
- data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +0 -2
- data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +11 -9
- data/lib/generated/gobl/schema/object.rb +0 -1
- data/lib/generated/gobl/tax/addon_def.rb +61 -0
- data/lib/generated/gobl/tax/{category.rb → category_def.rb} +11 -12
- data/lib/generated/gobl/tax/category_total.rb +0 -1
- data/lib/generated/gobl/tax/combo.rb +6 -2
- data/lib/generated/gobl/tax/correction_definition.rb +1 -2
- data/lib/generated/gobl/tax/correction_set.rb +13 -0
- data/lib/generated/gobl/tax/extensions.rb +0 -1
- data/lib/generated/gobl/tax/identity.rb +13 -19
- data/lib/generated/gobl/tax/{rate.rb → rate_def.rb} +11 -17
- data/lib/generated/gobl/tax/rate_total.rb +6 -2
- data/lib/generated/gobl/tax/rate_total_surcharge.rb +0 -1
- data/lib/generated/gobl/tax/{rate_value.rb → rate_value_def.rb} +9 -5
- data/lib/generated/gobl/tax/{regime.rb → regime_def.rb} +38 -24
- data/lib/generated/gobl/tax/scenario.rb +20 -11
- data/lib/generated/gobl/tax/scenario_set.rb +1 -2
- data/lib/generated/gobl/tax/set.rb +0 -1
- data/lib/generated/gobl/tax/source.rb +1 -2
- data/lib/generated/gobl/tax/tag_set.rb +28 -0
- data/lib/generated/gobl/tax/total.rb +0 -1
- data/lib/gobl/extensions/bill/invoice_helper.rb +6 -36
- data/lib/gobl/extensions/envelope_helper.rb +4 -0
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +3 -2
- metadata +20 -12
- data/lib/generated/gobl/bill/document_reference.rb +0 -37
- data/lib/generated/gobl/bill/preceding.rb +0 -79
- data/lib/generated/gobl/cbc/code_definition.rb +0 -38
- data/lib/generated/gobl/uuid/uuid.rb +0 -17
- data/lib/gobl/extensions/bill/scenario_summary.rb +0 -25
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -14,8 +13,13 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/registration'
|
15
14
|
|
16
15
|
# @!attribute [r] uuid
|
17
|
-
#
|
18
|
-
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
19
|
+
|
20
|
+
# @!attribute [r] label
|
21
|
+
# @return [String]
|
22
|
+
property :label, String
|
19
23
|
|
20
24
|
# @!attribute [r] capital
|
21
25
|
# @return [GOBL::Num::Amount]
|
@@ -52,6 +56,10 @@ module GOBL
|
|
52
56
|
# @!attribute [r] entry
|
53
57
|
# @return [String]
|
54
58
|
property :entry, String
|
59
|
+
|
60
|
+
# @!attribute [r] other
|
61
|
+
# @return [String]
|
62
|
+
property :other, String
|
55
63
|
end
|
56
64
|
end
|
57
65
|
end
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -14,9 +13,9 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/telephone'
|
15
14
|
|
16
15
|
# @!attribute [r] uuid
|
17
|
-
# Unique
|
18
|
-
# @return [
|
19
|
-
property :uuid,
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
20
19
|
|
21
20
|
# @!attribute [r] label
|
22
21
|
# Identifier for this number.
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -14,12 +13,12 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/website'
|
15
14
|
|
16
15
|
# @!attribute [r] uuid
|
17
|
-
# Unique
|
18
|
-
# @return [
|
19
|
-
property :uuid,
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
20
19
|
|
21
20
|
# @!attribute [r] label
|
22
|
-
#
|
21
|
+
# Label for the website to show alongside the URL.
|
23
22
|
# @return [String]
|
24
23
|
property :label, String
|
25
24
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -14,9 +13,9 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/pay/advance'
|
15
14
|
|
16
15
|
# @!attribute [r] uuid
|
17
|
-
# Unique
|
18
|
-
# @return [
|
19
|
-
property :uuid,
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
20
19
|
|
21
20
|
# @!attribute [r] date
|
22
21
|
# When the advance was made.
|
@@ -86,6 +85,11 @@ module GOBL
|
|
86
85
|
# @return [CreditTransfer]
|
87
86
|
property :credit_transfer, CreditTransfer
|
88
87
|
|
88
|
+
# @!attribute [r] ext
|
89
|
+
# Tax extensions required by tax regimes or addons.
|
90
|
+
# @return [GOBL::Tax::Extensions]
|
91
|
+
property :ext, GOBL::Tax::Extensions
|
92
|
+
|
89
93
|
# @!attribute [r] meta
|
90
94
|
# Additional details useful for the parties involved.
|
91
95
|
# @return [GOBL::CBC::Meta]
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -70,6 +69,11 @@ module GOBL
|
|
70
69
|
# @return [String]
|
71
70
|
property :notes, String
|
72
71
|
|
72
|
+
# @!attribute [r] ext
|
73
|
+
# Extension key-pairs values defined by a tax regime.
|
74
|
+
# @return [GOBL::Tax::Extensions]
|
75
|
+
property :ext, GOBL::Tax::Extensions
|
76
|
+
|
73
77
|
# @!attribute [r] meta
|
74
78
|
# Non-structured additional data that may be useful.
|
75
79
|
# @return [GOBL::CBC::Meta]
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -13,16 +12,21 @@ module GOBL
|
|
13
12
|
# The Schema ID of the GOBL Online structure
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/pay/instructions#/$defs/Online'
|
15
14
|
|
16
|
-
# @!attribute [r]
|
17
|
-
#
|
15
|
+
# @!attribute [r] key
|
16
|
+
# Key identifier for this online payment method.
|
17
|
+
# @return [GOBL::CBC::Key]
|
18
|
+
property :key, GOBL::CBC::Key
|
19
|
+
|
20
|
+
# @!attribute [r] label
|
21
|
+
# Descriptive label for the online provider.
|
18
22
|
# @return [String]
|
19
|
-
property :
|
23
|
+
property :label, String
|
20
24
|
|
21
|
-
# @!attribute [r]
|
22
|
-
#
|
25
|
+
# @!attribute [r] url
|
26
|
+
# URL to be used for payment.
|
23
27
|
# @return [String]
|
24
|
-
property :
|
25
|
-
validates_presence_of :
|
28
|
+
property :url, String
|
29
|
+
validates_presence_of :url
|
26
30
|
end
|
27
31
|
end
|
28
32
|
end
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -60,7 +59,6 @@ module GOBL
|
|
60
59
|
# Result of quantity multiplied by the unit price (maps to `Importe`).
|
61
60
|
# @return [GOBL::Num::Amount]
|
62
61
|
property :total, GOBL::Num::Amount
|
63
|
-
validates_presence_of :total
|
64
62
|
|
65
63
|
# @!attribute [r] taxes
|
66
64
|
# Map of taxes applied to the purchase (maps to `Traslados`).
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -14,23 +13,26 @@ module GOBL
|
|
14
13
|
# The Schema ID of the GOBL FuelAccountTax structure
|
15
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance#/$defs/FuelAccountTax'
|
16
15
|
|
17
|
-
# @!attribute [r]
|
18
|
-
#
|
16
|
+
# @!attribute [r] cat
|
17
|
+
# Category that identifies the tax ("VAT" or "IEPS", maps to `Impuesto`)
|
19
18
|
# @return [GOBL::CBC::Code]
|
20
|
-
property :
|
21
|
-
validates_presence_of :
|
19
|
+
property :cat, GOBL::CBC::Code
|
20
|
+
validates_presence_of :cat
|
21
|
+
|
22
|
+
# @!attribute [r] percent
|
23
|
+
# Percent applicable to the line total (tasa) to use instead of Rate (maps to `TasaoCuota`)
|
24
|
+
# @return [GOBL::Num::Percentage]
|
25
|
+
property :percent, GOBL::Num::Percentage
|
22
26
|
|
23
27
|
# @!attribute [r] rate
|
24
|
-
# Rate
|
28
|
+
# Rate is a fixed fee to apply to the line quantity (cuota) (maps to `TasaOCuota`)
|
25
29
|
# @return [GOBL::Num::Amount]
|
26
30
|
property :rate, GOBL::Num::Amount
|
27
|
-
validates_presence_of :rate
|
28
31
|
|
29
32
|
# @!attribute [r] amount
|
30
|
-
# Total amount of the tax once the rate has been applied (maps to `Importe`).
|
33
|
+
# Total amount of the tax once the percent or rate has been applied (maps to `Importe`).
|
31
34
|
# @return [GOBL::Num::Amount]
|
32
35
|
property :amount, GOBL::Num::Amount
|
33
|
-
validates_presence_of :amount
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module Tax
|
10
|
+
# AddonDef is an interface that defines the methods that a tax add-on must implement.
|
11
|
+
class AddonDef < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL AddonDef structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/addon-def'
|
14
|
+
|
15
|
+
# @!attribute [r] key
|
16
|
+
# Key that defines how to uniquely idenitfy the add-on.
|
17
|
+
# @return [GOBL::CBC::Key]
|
18
|
+
property :key, GOBL::CBC::Key
|
19
|
+
validates_presence_of :key
|
20
|
+
|
21
|
+
# @!attribute [r] name
|
22
|
+
# Name of the add-on
|
23
|
+
# @return [GOBL::I18n::String]
|
24
|
+
property :name, GOBL::I18n::String
|
25
|
+
validates_presence_of :name
|
26
|
+
|
27
|
+
# @!attribute [r] description
|
28
|
+
# Description of the add-on
|
29
|
+
# @return [GOBL::I18n::String]
|
30
|
+
property :description, GOBL::I18n::String
|
31
|
+
|
32
|
+
# @!attribute [r] extensions
|
33
|
+
# Extensions defines the list of extensions that are associated with an add-on.
|
34
|
+
# @return [Array<GOBL::CBC::KeyDefinition>]
|
35
|
+
property :extensions, [GOBL::CBC::KeyDefinition]
|
36
|
+
validates_presence_of :extensions
|
37
|
+
|
38
|
+
# @!attribute [r] tags
|
39
|
+
# Tags is slice of tag sets that define what can be assigned to each document schema.
|
40
|
+
# @return [Array<TagSet>]
|
41
|
+
property :tags, [TagSet]
|
42
|
+
|
43
|
+
# @!attribute [r] scenarios
|
44
|
+
# Scenarios are applied to documents after normalization and before validation to ensure that form specific extensions have been added to the document.
|
45
|
+
# @return [Array<ScenarioSet>]
|
46
|
+
property :scenarios, [ScenarioSet]
|
47
|
+
validates_presence_of :scenarios
|
48
|
+
|
49
|
+
# @!attribute [r] inboxes
|
50
|
+
# Inboxes is a list of keys that are used to identify where copies of documents can be sent.
|
51
|
+
# @return [Array<GOBL::CBC::KeyDefinition>]
|
52
|
+
property :inboxes, [GOBL::CBC::KeyDefinition]
|
53
|
+
|
54
|
+
# @!attribute [r] corrections
|
55
|
+
# Corrections is used to provide a map of correction definitions that are supported by the add-on.
|
56
|
+
# @return [CorrectionSet]
|
57
|
+
property :corrections, CorrectionSet
|
58
|
+
validates_presence_of :corrections
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -3,15 +3,14 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
10
9
|
module Tax
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/
|
10
|
+
# CategoryDef contains the definition of a general type of tax inside a region.
|
11
|
+
class CategoryDef < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL CategoryDef structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/CategoryDef'
|
15
14
|
|
16
15
|
# @!attribute [r] code
|
17
16
|
# Code to be used in documents
|
@@ -40,15 +39,10 @@ module GOBL
|
|
40
39
|
# @return [Boolean]
|
41
40
|
property :retained, Boolean
|
42
41
|
|
43
|
-
# @!attribute [r] rate_required
|
44
|
-
# 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.
|
45
|
-
# @return [Boolean]
|
46
|
-
property :rate_required, Boolean
|
47
|
-
|
48
42
|
# @!attribute [r] rates
|
49
43
|
# Specific tax definitions inside this category.
|
50
|
-
# @return [Array<
|
51
|
-
property :rates, [
|
44
|
+
# @return [Array<RateDef>]
|
45
|
+
property :rates, [RateDef]
|
52
46
|
|
53
47
|
# @!attribute [r] extensions
|
54
48
|
# 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.
|
@@ -65,6 +59,11 @@ module GOBL
|
|
65
59
|
# @return [Array<Source>]
|
66
60
|
property :sources, [Source]
|
67
61
|
|
62
|
+
# @!attribute [r] ext
|
63
|
+
# Extensions key-value pairs that will be copied to the tax combo if this category is used.
|
64
|
+
# @return [GOBL::Tax::Extensions]
|
65
|
+
property :ext, GOBL::Tax::Extensions
|
66
|
+
|
68
67
|
# @!attribute [r] meta
|
69
68
|
# Meta contains additional information about the category that is relevant for local frequently used formats.
|
70
69
|
# @return [GOBL::CBC::Meta]
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -19,13 +18,18 @@ module GOBL
|
|
19
18
|
property :cat, GOBL::CBC::Code
|
20
19
|
validates_presence_of :cat
|
21
20
|
|
21
|
+
# @!attribute [r] country
|
22
|
+
# Country code override when issuing with taxes applied from different countries.
|
23
|
+
# @return [GOBL::L10n::TaxCountryCode]
|
24
|
+
property :country, GOBL::L10n::TaxCountryCode
|
25
|
+
|
22
26
|
# @!attribute [r] rate
|
23
27
|
# Rate within a category to apply.
|
24
28
|
# @return [GOBL::CBC::Key]
|
25
29
|
property :rate, GOBL::CBC::Key
|
26
30
|
|
27
31
|
# @!attribute [r] percent
|
28
|
-
# Percent defines the percentage set manually or determined from the rate key (calculated if rate present).
|
32
|
+
# Percent defines the percentage set manually or determined from the rate key (calculated if rate present). A nil percent implies that this tax combo is **exempt** from tax.
|
29
33
|
# @return [GOBL::Num::Percentage]
|
30
34
|
property :percent, GOBL::Num::Percentage
|
31
35
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -11,7 +10,7 @@ module GOBL
|
|
11
10
|
# CorrectionDefinition contains details about what can be defined in .
|
12
11
|
class CorrectionDefinition < GOBL::Object
|
13
12
|
# The Schema ID of the GOBL CorrectionDefinition structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/CorrectionDefinition'
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/CorrectionDefinition'
|
15
14
|
|
16
15
|
# @!attribute [r] schema
|
17
16
|
# Partial or complete schema URL for the document type supported by correction.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module Tax
|
10
|
+
# CorrectionSet defines a set of correction definitions for a selection of schemas.
|
11
|
+
CorrectionSet = [CorrectionDefinition] # rubocop:disable Naming/ConstantName, Style/MutableConstant
|
12
|
+
end
|
13
|
+
end
|
@@ -3,41 +3,35 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
10
9
|
module Tax
|
11
|
-
# Identity stores the details required to identify an entity for tax purposes.
|
10
|
+
# Identity stores the details required to identify an entity for tax purposes in a specific country.
|
12
11
|
class Identity < GOBL::Object
|
13
12
|
# The Schema ID of the GOBL Identity structure
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity'
|
15
14
|
|
16
|
-
# @!attribute [r] uuid
|
17
|
-
# Unique universal identity code for this tax identity.
|
18
|
-
# @return [GOBL::UUID::UUID]
|
19
|
-
property :uuid, GOBL::UUID::UUID
|
20
|
-
|
21
15
|
# @!attribute [r] country
|
22
|
-
#
|
23
|
-
# @return [GOBL::L10n::
|
24
|
-
property :country, GOBL::L10n::
|
16
|
+
# Tax country code for Where the tax identity was issued.
|
17
|
+
# @return [GOBL::L10n::TaxCountryCode]
|
18
|
+
property :country, GOBL::L10n::TaxCountryCode
|
25
19
|
validates_presence_of :country
|
26
20
|
|
27
|
-
# @!attribute [r] type
|
28
|
-
# Type is set according the requirements of each regime, some have a single tax document type code, others require a choice to be made.
|
29
|
-
# @return [GOBL::CBC::Key]
|
30
|
-
property :type, GOBL::CBC::Key
|
31
|
-
|
32
21
|
# @!attribute [r] code
|
33
22
|
# Normalized code shown on the original identity document.
|
34
23
|
# @return [GOBL::CBC::Code]
|
35
24
|
property :code, GOBL::CBC::Code
|
36
25
|
|
37
|
-
# @!attribute [r]
|
38
|
-
#
|
39
|
-
# @return [GOBL::CBC::
|
40
|
-
property :
|
26
|
+
# @!attribute [r] type
|
27
|
+
# Type is set according to the requirements of each regime, some have a single tax document type code, others require a choice to be made. Deprecated: Tax Identities should only be used for VAT or similar codes for companies. Use the identities array for other types of identification.
|
28
|
+
# @return [GOBL::CBC::Key]
|
29
|
+
property :type, GOBL::CBC::Key
|
30
|
+
|
31
|
+
# @!attribute [r] zone
|
32
|
+
# Zone identifies a sub-locality within a country. Deprecated: Removed 2024-03-14 in favour of using tax tags and extensions with local data when required. Maintained here to support data migration.
|
33
|
+
# @return [GOBL::L10n::Code]
|
34
|
+
property :zone, GOBL::L10n::Code
|
41
35
|
end
|
42
36
|
end
|
43
37
|
end
|
@@ -3,15 +3,14 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
10
9
|
module Tax
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/
|
10
|
+
# RateDef defines a single rate inside a category
|
11
|
+
class RateDef < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL RateDef structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/RateDef'
|
15
14
|
|
16
15
|
# @!attribute [r] key
|
17
16
|
# Key identifies this rate within the system
|
@@ -37,18 +36,13 @@ module GOBL
|
|
37
36
|
|
38
37
|
# @!attribute [r] values
|
39
38
|
# Values contains a list of Value objects that contain the current and historical percentage values for the rate and additional filters. Order is important, newer values should come before older values.
|
40
|
-
# @return [Array<
|
41
|
-
property :values, [
|
42
|
-
|
43
|
-
# @!attribute [r]
|
44
|
-
# Extensions
|
45
|
-
# @return [
|
46
|
-
property :
|
47
|
-
|
48
|
-
# @!attribute [r] map
|
49
|
-
# Map is used to associate specific codes with the chosen rate.
|
50
|
-
# @return [GOBL::CBC::CodeMap]
|
51
|
-
property :map, GOBL::CBC::CodeMap
|
39
|
+
# @return [Array<RateValueDef>]
|
40
|
+
property :values, [RateValueDef]
|
41
|
+
|
42
|
+
# @!attribute [r] ext
|
43
|
+
# Extensions key-value pair that will be copied to the tax combo if this rate is used.
|
44
|
+
# @return [GOBL::Tax::Extensions]
|
45
|
+
property :ext, GOBL::Tax::Extensions
|
52
46
|
|
53
47
|
# @!attribute [r] meta
|
54
48
|
# Meta contains additional information about the rate that is relevant for local frequently used implementations.
|
@@ -3,7 +3,6 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.69.0
|
7
6
|
##
|
8
7
|
|
9
8
|
module GOBL
|
@@ -18,6 +17,11 @@ module GOBL
|
|
18
17
|
# @return [GOBL::CBC::Key]
|
19
18
|
property :key, GOBL::CBC::Key
|
20
19
|
|
20
|
+
# @!attribute [r] country
|
21
|
+
# 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.
|
22
|
+
# @return [GOBL::L10n::TaxCountryCode]
|
23
|
+
property :country, GOBL::L10n::TaxCountryCode
|
24
|
+
|
21
25
|
# @!attribute [r] ext
|
22
26
|
# If the rate is defined with extensions, they'll be used to group by also.
|
23
27
|
# @return [GOBL::Tax::Extensions]
|
@@ -30,7 +34,7 @@ module GOBL
|
|
30
34
|
validates_presence_of :base
|
31
35
|
|
32
36
|
# @!attribute [r] percent
|
33
|
-
# Percentage of the rate
|
37
|
+
# Percentage of the rate. Will be nil when taxes are **exempt**.
|
34
38
|
# @return [GOBL::Num::Percentage]
|
35
39
|
property :percent, GOBL::Num::Percentage
|
36
40
|
|