gobl 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extensions.rb +1 -1
- data/lib/gobl/bill/advances.rb +1 -1
- data/lib/gobl/bill/charge.rb +3 -3
- data/lib/gobl/bill/delivery.rb +1 -1
- data/lib/gobl/bill/discount.rb +3 -3
- data/lib/gobl/bill/exchange_rates.rb +1 -1
- data/lib/gobl/bill/invoice.rb +5 -5
- data/lib/gobl/bill/invoice_type.rb +1 -1
- data/lib/gobl/bill/line.rb +3 -3
- data/lib/gobl/bill/line_charge.rb +1 -1
- data/lib/gobl/bill/line_discount.rb +1 -1
- data/lib/gobl/bill/ordering.rb +1 -1
- data/lib/gobl/bill/outlay.rb +1 -1
- data/lib/gobl/bill/payment.rb +1 -1
- data/lib/gobl/bill/preceding.rb +5 -5
- data/lib/gobl/bill/scheme_keys.rb +2 -2
- data/lib/gobl/bill/tax.rb +5 -5
- data/lib/gobl/bill/totals.rb +1 -1
- data/lib/gobl/cal/date.rb +1 -1
- data/lib/gobl/cal/period.rb +1 -1
- data/lib/gobl/{org → cbc}/code.rb +3 -3
- data/lib/gobl/{org → cbc}/key.rb +3 -3
- data/lib/gobl/{org → cbc}/meta.rb +2 -2
- data/lib/gobl/{org → cbc}/note.rb +3 -3
- data/lib/gobl/{org → cbc}/note_key.rb +3 -3
- data/lib/gobl/{org → cbc}/stamp.rb +5 -5
- data/lib/gobl/currency/code.rb +1 -1
- data/lib/gobl/currency/exchange_rate.rb +1 -1
- data/lib/gobl/document.rb +1 -1
- data/lib/gobl/dsig/digest.rb +1 -1
- data/lib/gobl/dsig/signature.rb +1 -1
- data/lib/gobl/envelope.rb +1 -1
- data/lib/gobl/header.rb +5 -5
- data/lib/gobl/i18n/string.rb +1 -1
- data/lib/gobl/l10n/code.rb +1 -1
- data/lib/gobl/l10n/country_code.rb +1 -1
- data/lib/gobl/note/message.rb +3 -3
- data/lib/gobl/org/address.rb +5 -6
- data/lib/gobl/org/coordinates.rb +1 -1
- data/lib/gobl/org/email.rb +3 -3
- data/lib/gobl/org/inbox.rb +5 -5
- data/lib/gobl/org/item.rb +3 -3
- data/lib/gobl/org/item_code.rb +1 -1
- data/lib/gobl/org/name.rb +3 -3
- data/lib/gobl/org/party.rb +5 -5
- data/lib/gobl/org/person.rb +3 -3
- data/lib/gobl/org/registration.rb +1 -1
- data/lib/gobl/org/telephone.rb +1 -1
- data/lib/gobl/org/unit.rb +1 -1
- data/lib/gobl/pay/advance.rb +1 -1
- data/lib/gobl/pay/card.rb +1 -1
- data/lib/gobl/pay/credit_transfer.rb +1 -1
- data/lib/gobl/pay/direct_debit.rb +1 -1
- data/lib/gobl/pay/due_date.rb +1 -1
- data/lib/gobl/pay/instructions.rb +3 -3
- data/lib/gobl/pay/method_key.rb +1 -1
- data/lib/gobl/pay/online.rb +1 -1
- data/lib/gobl/pay/term_key.rb +1 -1
- data/lib/gobl/pay/terms.rb +1 -1
- data/lib/gobl/tax/category.rb +4 -4
- data/lib/gobl/tax/category_total.rb +3 -3
- data/lib/gobl/tax/combo.rb +5 -5
- data/lib/gobl/{org/tax_identity.rb → tax/identity.rb} +11 -11
- data/lib/gobl/tax/rate.rb +4 -4
- data/lib/gobl/tax/rate_total.rb +3 -3
- data/lib/gobl/tax/rate_total_surcharge.rb +1 -1
- data/lib/gobl/tax/rate_value.rb +2 -2
- data/lib/gobl/tax/{region.rb → regime.rb} +14 -14
- data/lib/gobl/tax/scheme.rb +8 -8
- data/lib/gobl/tax/schemes.rb +1 -1
- data/lib/gobl/tax/set.rb +1 -1
- data/lib/gobl/{org → tax}/source_key.rb +3 -3
- data/lib/gobl/tax/total.rb +1 -1
- data/lib/gobl/tax/zone.rb +43 -0
- data/lib/gobl/uuid/uuid.rb +1 -1
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +2 -1
- data/lib/gobl_extensions/tax/regime_helper.rb +35 -0
- metadata +13 -19
- data/data/tax/CO.json +0 -10212
- data/data/tax/ES.json +0 -902
- data/data/tax/FR.json +0 -47
- data/data/tax/GB.json +0 -56
- data/data/tax/NL.json +0 -60
- data/lib/gobl/tax/localities.rb +0 -14
- data/lib/gobl/tax/locality.rb +0 -34
- data/lib/gobl_extensions/tax/region_helper.rb +0 -35
data/lib/gobl/org/inbox.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -20,14 +20,14 @@ module GOBL
|
|
20
20
|
|
21
21
|
# @!attribute [r] key
|
22
22
|
# Type of inbox being defined.
|
23
|
-
# @return [GOBL::
|
24
|
-
property :key, GOBL::
|
23
|
+
# @return [GOBL::CBC::Key]
|
24
|
+
property :key, GOBL::CBC::Key
|
25
25
|
validates :key, presence: true
|
26
26
|
|
27
27
|
# @!attribute [r] role
|
28
28
|
# Role assigned to this inbox that may be relevant for the consumer.
|
29
|
-
# @return [GOBL::
|
30
|
-
property :role, GOBL::
|
29
|
+
# @return [GOBL::CBC::Key]
|
30
|
+
property :role, GOBL::CBC::Key
|
31
31
|
|
32
32
|
# @!attribute [r] name
|
33
33
|
# Human name for the inbox.
|
data/lib/gobl/org/item.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -62,8 +62,8 @@ module GOBL
|
|
62
62
|
|
63
63
|
# @!attribute [r] meta
|
64
64
|
# Additional meta information that may be useful
|
65
|
-
# @return [GOBL::
|
66
|
-
property :meta, GOBL::
|
65
|
+
# @return [GOBL::CBC::Meta]
|
66
|
+
property :meta, GOBL::CBC::Meta
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/lib/gobl/org/item_code.rb
CHANGED
data/lib/gobl/org/name.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -57,8 +57,8 @@ module GOBL
|
|
57
57
|
|
58
58
|
# @!attribute [r] meta
|
59
59
|
# Any additional useful data.
|
60
|
-
# @return [GOBL::
|
61
|
-
property :meta, GOBL::
|
60
|
+
# @return [GOBL::CBC::Meta]
|
61
|
+
property :meta, GOBL::CBC::Meta
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
data/lib/gobl/org/party.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -25,8 +25,8 @@ module GOBL
|
|
25
25
|
|
26
26
|
# @!attribute [r] tax_id
|
27
27
|
# The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes.
|
28
|
-
# @return [GOBL::
|
29
|
-
property :tax_id, GOBL::
|
28
|
+
# @return [GOBL::Tax::Identity]
|
29
|
+
property :tax_id, GOBL::Tax::Identity
|
30
30
|
|
31
31
|
# @!attribute [r] name
|
32
32
|
# Legal name or representation of the organization.
|
@@ -71,8 +71,8 @@ module GOBL
|
|
71
71
|
|
72
72
|
# @!attribute [r] meta
|
73
73
|
# Any additional semi-structured information that does not fit into the rest of the party.
|
74
|
-
# @return [GOBL::
|
75
|
-
property :meta, GOBL::
|
74
|
+
# @return [GOBL::CBC::Meta]
|
75
|
+
property :meta, GOBL::CBC::Meta
|
76
76
|
end
|
77
77
|
end
|
78
78
|
end
|
data/lib/gobl/org/person.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -46,8 +46,8 @@ module GOBL
|
|
46
46
|
|
47
47
|
# @!attribute [r] meta
|
48
48
|
# Data about the data.
|
49
|
-
# @return [GOBL::
|
50
|
-
property :meta, GOBL::
|
49
|
+
# @return [GOBL::CBC::Meta]
|
50
|
+
property :meta, GOBL::CBC::Meta
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
data/lib/gobl/org/telephone.rb
CHANGED
data/lib/gobl/org/unit.rb
CHANGED
data/lib/gobl/pay/advance.rb
CHANGED
data/lib/gobl/pay/card.rb
CHANGED
data/lib/gobl/pay/due_date.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -56,8 +56,8 @@ module GOBL
|
|
56
56
|
|
57
57
|
# @!attribute [r] meta
|
58
58
|
# Non-structured additional data that may be useful.
|
59
|
-
# @return [GOBL::
|
60
|
-
property :meta, GOBL::
|
59
|
+
# @return [GOBL::CBC::Meta]
|
60
|
+
property :meta, GOBL::CBC::Meta
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
data/lib/gobl/pay/method_key.rb
CHANGED
data/lib/gobl/pay/online.rb
CHANGED
data/lib/gobl/pay/term_key.rb
CHANGED
data/lib/gobl/pay/terms.rb
CHANGED
data/lib/gobl/tax/category.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,11 +11,11 @@ module GOBL
|
|
11
11
|
# Category contains the definition of a general type of tax inside a region.
|
12
12
|
class Category < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Category structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Category'
|
15
15
|
|
16
16
|
# @!attribute [r] code
|
17
|
-
# @return [GOBL::
|
18
|
-
property :code, GOBL::
|
17
|
+
# @return [GOBL::CBC::Code]
|
18
|
+
property :code, GOBL::CBC::Code
|
19
19
|
validates :code, presence: true
|
20
20
|
|
21
21
|
# @!attribute [r] name
|
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -14,8 +14,8 @@ module GOBL
|
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/CategoryTotal'
|
15
15
|
|
16
16
|
# @!attribute [r] code
|
17
|
-
# @return [GOBL::
|
18
|
-
property :code, GOBL::
|
17
|
+
# @return [GOBL::CBC::Code]
|
18
|
+
property :code, GOBL::CBC::Code
|
19
19
|
validates :code, presence: true
|
20
20
|
|
21
21
|
# @!attribute [r] retained
|
data/lib/gobl/tax/combo.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -15,14 +15,14 @@ module GOBL
|
|
15
15
|
|
16
16
|
# @!attribute [r] cat
|
17
17
|
# Tax category code from those available inside a region.
|
18
|
-
# @return [GOBL::
|
19
|
-
property :cat, GOBL::
|
18
|
+
# @return [GOBL::CBC::Code]
|
19
|
+
property :cat, GOBL::CBC::Code
|
20
20
|
validates :cat, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] rate
|
23
23
|
# Rate within a category to apply.
|
24
|
-
# @return [GOBL::
|
25
|
-
property :rate, GOBL::
|
24
|
+
# @return [GOBL::CBC::Key]
|
25
|
+
property :rate, GOBL::CBC::Key
|
26
26
|
|
27
27
|
# @!attribute [r] percent
|
28
28
|
# Percent defines the percentage set manually or determined from the rate key (calculated if rate present).
|
@@ -3,15 +3,15 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
|
-
module
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/
|
10
|
+
module Tax
|
11
|
+
# Identity stores the details required to identify an entity for tax purposes.
|
12
|
+
class Identity < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Identity structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity'
|
15
15
|
|
16
16
|
# @!attribute [r] uuid
|
17
17
|
# Unique universal identity code for this tax identity.
|
@@ -24,10 +24,10 @@ module GOBL
|
|
24
24
|
property :country, GOBL::L10n::CountryCode
|
25
25
|
validates :country, presence: true
|
26
26
|
|
27
|
-
# @!attribute [r]
|
28
|
-
# Where inside
|
27
|
+
# @!attribute [r] zone
|
28
|
+
# Where inside the country the tax identity holder is based for tax purposes like a village, town, district, city, county, state or province. For some areas, this could be a regular post or zip code. See the regime packages for specific validation rules.
|
29
29
|
# @return [GOBL::L10n::Code]
|
30
|
-
property :
|
30
|
+
property :zone, GOBL::L10n::Code
|
31
31
|
|
32
32
|
# @!attribute [r] source
|
33
33
|
# What is the source document of the tax identity.
|
@@ -41,8 +41,8 @@ module GOBL
|
|
41
41
|
|
42
42
|
# @!attribute [r] meta
|
43
43
|
# Additional details that may be required.
|
44
|
-
# @return [GOBL::
|
45
|
-
property :meta, GOBL::
|
44
|
+
# @return [GOBL::CBC::Meta]
|
45
|
+
property :meta, GOBL::CBC::Meta
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/gobl/tax/rate.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,12 +11,12 @@ module GOBL
|
|
11
11
|
# Rate defines a single rate inside a category
|
12
12
|
class Rate < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Rate structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Rate'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
17
|
# Key identifies this rate within the system
|
18
|
-
# @return [GOBL::
|
19
|
-
property :key, GOBL::
|
18
|
+
# @return [GOBL::CBC::Key]
|
19
|
+
property :key, GOBL::CBC::Key
|
20
20
|
validates :key, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] name
|
data/lib/gobl/tax/rate_total.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -14,8 +14,8 @@ module GOBL
|
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/RateTotal'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
|
-
# @return [GOBL::
|
18
|
-
property :key, GOBL::
|
17
|
+
# @return [GOBL::CBC::Key]
|
18
|
+
property :key, GOBL::CBC::Key
|
19
19
|
|
20
20
|
# @!attribute [r] base
|
21
21
|
# @return [GOBL::Num::Amount]
|
data/lib/gobl/tax/rate_value.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,7 +11,7 @@ module GOBL
|
|
11
11
|
# RateValue contains a percentage rate or fixed amount for a given date range.
|
12
12
|
class RateValue < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL RateValue structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/RateValue'
|
15
15
|
|
16
16
|
# @!attribute [r] since
|
17
17
|
# Date from which this value should be applied.
|
@@ -3,18 +3,18 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module Tax
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
11
|
+
# Regime defines the holding structure for the definitions of taxes inside a country or territory.
|
12
|
+
class Regime < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Regime structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime'
|
15
15
|
|
16
16
|
# @!attribute [r] name
|
17
|
-
# Name of the
|
17
|
+
# Name of the country
|
18
18
|
# @return [GOBL::I18n::String]
|
19
19
|
property :name, GOBL::I18n::String
|
20
20
|
validates :name, presence: true
|
@@ -25,18 +25,18 @@ module GOBL
|
|
25
25
|
property :country, GOBL::L10n::CountryCode
|
26
26
|
validates :country, presence: true
|
27
27
|
|
28
|
-
# @!attribute [r]
|
29
|
-
# Locality, city, province, county, or similar code inside the country, if needed.
|
28
|
+
# @!attribute [r] zone
|
29
|
+
# Specific Locality, region, city, province, county, or similar code inside the country, if needed.
|
30
30
|
# @return [GOBL::L10n::Code]
|
31
|
-
property :
|
31
|
+
property :zone, GOBL::L10n::Code
|
32
32
|
|
33
|
-
# @!attribute [r]
|
34
|
-
# List of sub-
|
35
|
-
# @return [Array<
|
36
|
-
property :
|
33
|
+
# @!attribute [r] zones
|
34
|
+
# List of sub-zones inside a country.
|
35
|
+
# @return [Array<Zone>]
|
36
|
+
property :zones, [Zone]
|
37
37
|
|
38
38
|
# @!attribute [r] currency
|
39
|
-
# Currency used by the
|
39
|
+
# Currency used by the country.
|
40
40
|
# @return [GOBL::Currency::Code]
|
41
41
|
property :currency, GOBL::Currency::Code
|
42
42
|
validates :currency, presence: true
|
data/lib/gobl/tax/scheme.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,12 +11,12 @@ module GOBL
|
|
11
11
|
# Scheme contains the definition of a scheme that belongs to a region and can be used to simplify validation processes for document contents.
|
12
12
|
class Scheme < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Scheme structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Scheme'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
17
|
# Key used to identify this scheme
|
18
|
-
# @return [GOBL::
|
19
|
-
property :key, GOBL::
|
18
|
+
# @return [GOBL::CBC::Key]
|
19
|
+
property :key, GOBL::CBC::Key
|
20
20
|
validates :key, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] name
|
@@ -32,13 +32,13 @@ module GOBL
|
|
32
32
|
|
33
33
|
# @!attribute [r] categories
|
34
34
|
# List of tax category codes that can be used when this scheme is applied.
|
35
|
-
# @return [Array<GOBL::
|
36
|
-
property :categories, [GOBL::
|
35
|
+
# @return [Array<GOBL::CBC::Code>]
|
36
|
+
property :categories, [GOBL::CBC::Code]
|
37
37
|
|
38
38
|
# @!attribute [r] note
|
39
39
|
# Note defines a message that should be added to a document when this scheme is used.
|
40
|
-
# @return [GOBL::
|
41
|
-
property :note, GOBL::
|
40
|
+
# @return [GOBL::CBC::Note]
|
41
|
+
property :note, GOBL::CBC::Note
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
data/lib/gobl/tax/schemes.rb
CHANGED
data/lib/gobl/tax/set.rb
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
|
-
module
|
10
|
+
module Tax
|
11
11
|
# SourceKey identifies the source of a tax identity
|
12
12
|
class SourceKey < GOBL::Enum
|
13
13
|
# The Schema ID of the GOBL SourceKey structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity#/$defs/SourceKey'
|
15
15
|
|
16
16
|
# The enumeration of values of the object and their descriptions (Values different to these are not allowed)
|
17
17
|
ENUM = {
|
data/lib/gobl/tax/total.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
## Generated with GOBL v0.34.0
|
7
|
+
##
|
8
|
+
|
9
|
+
module GOBL
|
10
|
+
module Tax
|
11
|
+
# Zone represents an area inside a country, like a province or a state, which shares the basic definitions of the country, but may vary in some validation rules.
|
12
|
+
class Zone < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Zone structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Zone'
|
15
|
+
|
16
|
+
# @!attribute [r] code
|
17
|
+
# Unique zone code.
|
18
|
+
# @return [GOBL::L10n::Code]
|
19
|
+
property :code, GOBL::L10n::Code
|
20
|
+
validates :code, presence: true
|
21
|
+
|
22
|
+
# @!attribute [r] name
|
23
|
+
# Name of the zone to be use if a locality or region is not applicable.
|
24
|
+
# @return [GOBL::I18n::String]
|
25
|
+
property :name, GOBL::I18n::String
|
26
|
+
|
27
|
+
# @!attribute [r] locality
|
28
|
+
# Village, town, district, or city name which should coincide with address data.
|
29
|
+
# @return [GOBL::I18n::String]
|
30
|
+
property :locality, GOBL::I18n::String
|
31
|
+
|
32
|
+
# @!attribute [r] region
|
33
|
+
# Province, county, or state which should match address data.
|
34
|
+
# @return [GOBL::I18n::String]
|
35
|
+
property :region, GOBL::I18n::String
|
36
|
+
|
37
|
+
# @!attribute [r] meta
|
38
|
+
# Any additional information
|
39
|
+
# @return [GOBL::CBC::Meta]
|
40
|
+
property :meta, GOBL::CBC::Meta
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|