gobl 0.23.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/regimes/ae.json +49 -83
- data/data/regimes/at.json +58 -69
- data/data/regimes/be.json +65 -76
- data/data/regimes/br.json +83 -54
- data/data/regimes/ca.json +3 -3
- data/data/regimes/ch.json +62 -62
- data/data/regimes/co.json +65 -70
- data/data/regimes/de.json +56 -83
- data/data/regimes/el.json +74 -73
- data/data/regimes/es.json +127 -88
- data/data/regimes/fr.json +64 -72
- data/data/regimes/gb.json +54 -68
- data/data/regimes/ie.json +172 -0
- data/data/regimes/it.json +77 -79
- data/data/regimes/mx.json +58 -81
- data/data/regimes/nl.json +55 -70
- data/data/regimes/pl.json +40 -364
- data/data/regimes/pt.json +66 -64
- data/data/regimes/se.json +215 -0
- data/data/regimes/sg.json +119 -0
- data/data/regimes/us.json +0 -58
- data/lib/generated/gobl/bill/delivery.rb +4 -1
- data/lib/generated/gobl/bill/invoice.rb +4 -1
- data/lib/generated/gobl/bill/line.rb +5 -0
- data/lib/generated/gobl/bill/order.rb +4 -1
- data/lib/generated/gobl/bill/ordering.rb +5 -0
- data/lib/generated/gobl/bill/payment.rb +4 -1
- data/lib/generated/gobl/org/attachment.rb +0 -5
- data/lib/generated/gobl/org/document_ref.rb +6 -1
- data/lib/generated/gobl/org/item.rb +5 -0
- data/lib/generated/gobl/org/person.rb +17 -2
- data/lib/generated/gobl/org/unit.rb +9 -0
- data/lib/generated/gobl/tax/category_def.rb +11 -1
- data/lib/generated/gobl/tax/category_total.rb +4 -0
- data/lib/generated/gobl/tax/combo.rb +8 -3
- data/lib/generated/gobl/tax/key_def.rb +36 -0
- data/lib/generated/gobl/tax/rate_def.rb +9 -14
- data/lib/generated/gobl/tax/rate_total.rb +5 -5
- data/lib/generated/gobl/tax/rate_value_def.rb +1 -6
- data/lib/generated/gobl/tax/scenario.rb +5 -0
- data/lib/gobl/version.rb +1 -1
- metadata +6 -2
|
@@ -26,12 +26,15 @@ module GOBL
|
|
|
26
26
|
'ES' => 'Spain',
|
|
27
27
|
'FR' => 'France',
|
|
28
28
|
'GB' => 'United Kingdom',
|
|
29
|
+
'IE' => 'Ireland',
|
|
29
30
|
'IN' => 'India',
|
|
30
31
|
'IT' => 'Italy',
|
|
31
32
|
'MX' => 'Mexico',
|
|
32
33
|
'NL' => 'The Netherlands',
|
|
33
34
|
'PL' => 'Poland',
|
|
34
35
|
'PT' => 'Portugal',
|
|
36
|
+
'SE' => 'Sweden',
|
|
37
|
+
'SG' => 'Singapore',
|
|
35
38
|
'US' => 'United States of America'
|
|
36
39
|
}.freeze
|
|
37
40
|
|
|
@@ -46,7 +49,7 @@ module GOBL
|
|
|
46
49
|
property :$addons, [GOBL::CBC::Key]
|
|
47
50
|
|
|
48
51
|
# @!attribute [r] $tags
|
|
49
|
-
# Tags are used to help identify specific tax scenarios or requirements that
|
|
52
|
+
# Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags.
|
|
50
53
|
# @return [Array<GOBL::CBC::Key>]
|
|
51
54
|
property :$tags, [GOBL::CBC::Key]
|
|
52
55
|
|
|
@@ -52,11 +52,6 @@ module GOBL
|
|
|
52
52
|
# MIME type of the attachment.
|
|
53
53
|
# @return [String]
|
|
54
54
|
property :mime, String
|
|
55
|
-
|
|
56
|
-
# @!attribute [r] data
|
|
57
|
-
# Data is the base64 encoded data of the attachment directly embedded inside the GOBL document. This should only be used when the URL cannot be used as it can dramatically increase the size of the JSON document, thus effecting usability and performance.
|
|
58
|
-
# @return [String]
|
|
59
|
-
property :data, String
|
|
60
55
|
end
|
|
61
56
|
end
|
|
62
57
|
end
|
|
@@ -17,8 +17,13 @@ module GOBL
|
|
|
17
17
|
# @return [String]
|
|
18
18
|
property :uuid, String
|
|
19
19
|
|
|
20
|
+
# @!attribute [r] schema
|
|
21
|
+
# Schema of the referenced document if different from that of the parent.
|
|
22
|
+
# @return [String]
|
|
23
|
+
property :schema, String
|
|
24
|
+
|
|
20
25
|
# @!attribute [r] type
|
|
21
|
-
# Type of the document referenced.
|
|
26
|
+
# Type of the document referenced according to the defined schema or that of the parent document.
|
|
22
27
|
# @return [GOBL::CBC::Key]
|
|
23
28
|
property :type, GOBL::CBC::Key
|
|
24
29
|
|
|
@@ -43,6 +43,11 @@ module GOBL
|
|
|
43
43
|
# @return [String]
|
|
44
44
|
property :description, String
|
|
45
45
|
|
|
46
|
+
# @!attribute [r] images
|
|
47
|
+
# Images associated with the item.
|
|
48
|
+
# @return [Array<GOBL::Org::Image>]
|
|
49
|
+
property :images, [GOBL::Org::Image]
|
|
50
|
+
|
|
46
51
|
# @!attribute [r] currency
|
|
47
52
|
# Currency used for the item's price.
|
|
48
53
|
# @return [GOBL::Currency::Code]
|
|
@@ -22,17 +22,32 @@ module GOBL
|
|
|
22
22
|
# @return [String]
|
|
23
23
|
property :label, String
|
|
24
24
|
|
|
25
|
+
# @!attribute [r] key
|
|
26
|
+
# Key used to identify the role of the person inside the context of the object.
|
|
27
|
+
# @return [GOBL::CBC::Key]
|
|
28
|
+
property :key, GOBL::CBC::Key
|
|
29
|
+
|
|
25
30
|
# @!attribute [r] name
|
|
26
|
-
# Complete details on the name of the person
|
|
31
|
+
# Complete details on the name of the person.
|
|
27
32
|
# @return [GOBL::Org::Name]
|
|
28
33
|
property :name, GOBL::Org::Name
|
|
29
34
|
validates_presence_of :name
|
|
30
35
|
|
|
31
36
|
# @!attribute [r] role
|
|
32
|
-
#
|
|
37
|
+
# Role or job title of the responsibilities of the person within an organization.
|
|
33
38
|
# @return [String]
|
|
34
39
|
property :role, String
|
|
35
40
|
|
|
41
|
+
# @!attribute [r] identities
|
|
42
|
+
# Set of codes used to identify the person, such as ID numbers, social security, driving licenses, etc. that can be attributed to the individual.
|
|
43
|
+
# @return [Array<GOBL::Org::Identity>]
|
|
44
|
+
property :identities, [GOBL::Org::Identity]
|
|
45
|
+
|
|
46
|
+
# @!attribute [r] addresses
|
|
47
|
+
# Regular post addresses for where information should be sent if needed.
|
|
48
|
+
# @return [Array<GOBL::Org::Address>]
|
|
49
|
+
property :addresses, [GOBL::Org::Address]
|
|
50
|
+
|
|
36
51
|
# @!attribute [r] emails
|
|
37
52
|
# Electronic mail addresses that belong to the person.
|
|
38
53
|
# @return [Array<GOBL::Org::Email>]
|
|
@@ -21,11 +21,20 @@ module GOBL
|
|
|
21
21
|
't' => 'Metric tons',
|
|
22
22
|
'mm' => 'Milimetres',
|
|
23
23
|
'cm' => 'Centimetres',
|
|
24
|
+
'dm' => 'A unit of length equal to one-tenth of a metre.',
|
|
24
25
|
'm' => 'Metres',
|
|
25
26
|
'km' => 'Kilometers',
|
|
26
27
|
'in' => 'Inches',
|
|
27
28
|
'ft' => 'Feet',
|
|
29
|
+
'mm2' => 'Square millimetres',
|
|
30
|
+
'cm2' => 'Square centimetres',
|
|
31
|
+
'dm2' => 'Square decimetres',
|
|
28
32
|
'm2' => 'Square metres',
|
|
33
|
+
'ac' => 'A unit of area equal to 43,560 square feet.',
|
|
34
|
+
'ha' => 'A unit of area equal to 10,000 square metres.',
|
|
35
|
+
'mm3' => 'Cubic millimetres',
|
|
36
|
+
'cm3' => 'Cubic centimetres',
|
|
37
|
+
'dm3' => 'Cubic decimetres',
|
|
29
38
|
'm3' => 'Cubic metres',
|
|
30
39
|
'ml' => 'Millilitres',
|
|
31
40
|
'cl' => 'Centilitres',
|
|
@@ -39,8 +39,18 @@ module GOBL
|
|
|
39
39
|
# @return [Boolean]
|
|
40
40
|
property :retained, Boolean
|
|
41
41
|
|
|
42
|
+
# @!attribute [r] informative
|
|
43
|
+
# Informative when true implies that the tax amount will be calculated and reported but will not affect the invoice totals. Typically used for taxes that are embedded in the base amount or don't impact the final payable amount.
|
|
44
|
+
# @return [Boolean]
|
|
45
|
+
property :informative, Boolean
|
|
46
|
+
|
|
47
|
+
# @!attribute [r] keys
|
|
48
|
+
# Specific tax definitions inside this category.
|
|
49
|
+
# @return [Array<KeyDef>]
|
|
50
|
+
property :keys, [KeyDef]
|
|
51
|
+
|
|
42
52
|
# @!attribute [r] rates
|
|
43
|
-
#
|
|
53
|
+
# Rates defines the set of rates that can be used with this category.
|
|
44
54
|
# @return [Array<RateDef>]
|
|
45
55
|
property :rates, [RateDef]
|
|
46
56
|
|
|
@@ -23,18 +23,23 @@ module GOBL
|
|
|
23
23
|
# @return [GOBL::L10n::TaxCountryCode]
|
|
24
24
|
property :country, GOBL::L10n::TaxCountryCode
|
|
25
25
|
|
|
26
|
+
# @!attribute [r] key
|
|
27
|
+
# Key helps determine the tax situation within the category.
|
|
28
|
+
# @return [GOBL::CBC::Key]
|
|
29
|
+
property :key, GOBL::CBC::Key
|
|
30
|
+
|
|
26
31
|
# @!attribute [r] rate
|
|
27
|
-
# Rate within a category to apply.
|
|
32
|
+
# Rate within a category and for a given key to apply.
|
|
28
33
|
# @return [GOBL::CBC::Key]
|
|
29
34
|
property :rate, GOBL::CBC::Key
|
|
30
35
|
|
|
31
36
|
# @!attribute [r] percent
|
|
32
|
-
# Percent defines the percentage set manually or determined from the
|
|
37
|
+
# Percent defines the percentage set manually or determined from the key. A nil percent implies that this tax combo is either exempt or not-subject.
|
|
33
38
|
# @return [GOBL::Num::Percentage]
|
|
34
39
|
property :percent, GOBL::Num::Percentage
|
|
35
40
|
|
|
36
41
|
# @!attribute [r] surcharge
|
|
37
|
-
# Some countries require an additional surcharge (
|
|
42
|
+
# Some countries require an additional surcharge (may be determined if key present).
|
|
38
43
|
# @return [GOBL::Num::Percentage]
|
|
39
44
|
property :surcharge, GOBL::Num::Percentage
|
|
40
45
|
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# KeyDef defines a key that can be used inside a tax category.
|
|
11
|
+
class KeyDef < GOBL::Object
|
|
12
|
+
# The Schema ID of the GOBL KeyDef structure
|
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/KeyDef'
|
|
14
|
+
|
|
15
|
+
# @!attribute [r] key
|
|
16
|
+
# Key identifies this rate within the system
|
|
17
|
+
# @return [GOBL::CBC::Key]
|
|
18
|
+
property :key, GOBL::CBC::Key
|
|
19
|
+
|
|
20
|
+
# @!attribute [r] name
|
|
21
|
+
# Human name of the rate set
|
|
22
|
+
# @return [GOBL::I18n::String]
|
|
23
|
+
property :name, GOBL::I18n::String
|
|
24
|
+
|
|
25
|
+
# @!attribute [r] desc
|
|
26
|
+
# Useful description of the rate.
|
|
27
|
+
# @return [GOBL::I18n::String]
|
|
28
|
+
property :desc, GOBL::I18n::String
|
|
29
|
+
|
|
30
|
+
# @!attribute [r] no_percent
|
|
31
|
+
# NoPercent when true implies that the rate when used in a tax Combo should not define a percent value.
|
|
32
|
+
# @return [Boolean]
|
|
33
|
+
property :no_percent, Boolean
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -12,11 +12,16 @@ module GOBL
|
|
|
12
12
|
# The Schema ID of the GOBL RateDef structure
|
|
13
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/RateDef'
|
|
14
14
|
|
|
15
|
-
# @!attribute [r]
|
|
16
|
-
#
|
|
15
|
+
# @!attribute [r] rate
|
|
16
|
+
# Rate defines the key for which this rate applies.
|
|
17
17
|
# @return [GOBL::CBC::Key]
|
|
18
|
-
property :
|
|
19
|
-
validates_presence_of :
|
|
18
|
+
property :rate, GOBL::CBC::Key
|
|
19
|
+
validates_presence_of :rate
|
|
20
|
+
|
|
21
|
+
# @!attribute [r] keys
|
|
22
|
+
# Keys identifies the set of tax keys defined in the category that this rate can be used with.
|
|
23
|
+
# @return [Array<GOBL::CBC::Key>]
|
|
24
|
+
property :keys, [GOBL::CBC::Key]
|
|
20
25
|
|
|
21
26
|
# @!attribute [r] name
|
|
22
27
|
# Human name of the rate
|
|
@@ -29,21 +34,11 @@ module GOBL
|
|
|
29
34
|
# @return [GOBL::I18n::String]
|
|
30
35
|
property :desc, GOBL::I18n::String
|
|
31
36
|
|
|
32
|
-
# @!attribute [r] exempt
|
|
33
|
-
# Exempt when true implies that the rate when used in a tax Combo should not define a percent value.
|
|
34
|
-
# @return [Boolean]
|
|
35
|
-
property :exempt, Boolean
|
|
36
|
-
|
|
37
37
|
# @!attribute [r] values
|
|
38
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.
|
|
39
39
|
# @return [Array<RateValueDef>]
|
|
40
40
|
property :values, [RateValueDef]
|
|
41
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
|
|
46
|
-
|
|
47
42
|
# @!attribute [r] meta
|
|
48
43
|
# Meta contains additional information about the rate that is relevant for local frequently used implementations.
|
|
49
44
|
# @return [GOBL::CBC::Meta]
|
|
@@ -12,16 +12,16 @@ module GOBL
|
|
|
12
12
|
# The Schema ID of the GOBL RateTotal structure
|
|
13
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/RateTotal'
|
|
14
14
|
|
|
15
|
-
# @!attribute [r] key
|
|
16
|
-
# Optional rate key is required when grouping.
|
|
17
|
-
# @return [GOBL::CBC::Key]
|
|
18
|
-
property :key, GOBL::CBC::Key
|
|
19
|
-
|
|
20
15
|
# @!attribute [r] country
|
|
21
16
|
# 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
17
|
# @return [GOBL::L10n::TaxCountryCode]
|
|
23
18
|
property :country, GOBL::L10n::TaxCountryCode
|
|
24
19
|
|
|
20
|
+
# @!attribute [r] key
|
|
21
|
+
# Tax key if supported by the category.
|
|
22
|
+
# @return [GOBL::CBC::Key]
|
|
23
|
+
property :key, GOBL::CBC::Key
|
|
24
|
+
|
|
25
25
|
# @!attribute [r] ext
|
|
26
26
|
# If the rate is defined with extensions, they'll be used to group by also.
|
|
27
27
|
# @return [GOBL::Tax::Extensions]
|
|
@@ -12,13 +12,8 @@ module GOBL
|
|
|
12
12
|
# The Schema ID of the GOBL RateValueDef structure
|
|
13
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/RateValueDef'
|
|
14
14
|
|
|
15
|
-
# @!attribute [r] tags
|
|
16
|
-
# Only apply this rate if one of the tags is present in the invoice.
|
|
17
|
-
# @return [Array<GOBL::CBC::Key>]
|
|
18
|
-
property :tags, [GOBL::CBC::Key]
|
|
19
|
-
|
|
20
15
|
# @!attribute [r] ext
|
|
21
|
-
# Ext map of keys that can be used to filter to determine if the rate applies.
|
|
16
|
+
# Only apply this rate if one of the tags is present in the invoice. Tags []cbc.Key `json:"tags,omitempty" jsonschema:"title=Tags"` Ext map of keys that can be used to filter to determine if the rate applies.
|
|
22
17
|
# @return [GOBL::Tax::Extensions]
|
|
23
18
|
property :ext, GOBL::Tax::Extensions
|
|
24
19
|
|
|
@@ -17,6 +17,11 @@ module GOBL
|
|
|
17
17
|
# @return [GOBL::I18n::String]
|
|
18
18
|
property :name, GOBL::I18n::String
|
|
19
19
|
|
|
20
|
+
# @!attribute [r] desc
|
|
21
|
+
# Description of the scenario for documentation purposes.
|
|
22
|
+
# @return [GOBL::I18n::String]
|
|
23
|
+
property :desc, GOBL::I18n::String
|
|
24
|
+
|
|
20
25
|
# @!attribute [r] type
|
|
21
26
|
# Type of document, if present.
|
|
22
27
|
# @return [Array<GOBL::CBC::Key>]
|
data/lib/gobl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gobl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.24.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luismi Cavalle
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2025-
|
|
14
|
+
date: 2025-11-03 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: activesupport
|
|
@@ -75,12 +75,15 @@ files:
|
|
|
75
75
|
- data/regimes/fr.json
|
|
76
76
|
- data/regimes/gb.json
|
|
77
77
|
- data/regimes/gr.json
|
|
78
|
+
- data/regimes/ie.json
|
|
78
79
|
- data/regimes/in.json
|
|
79
80
|
- data/regimes/it.json
|
|
80
81
|
- data/regimes/mx.json
|
|
81
82
|
- data/regimes/nl.json
|
|
82
83
|
- data/regimes/pl.json
|
|
83
84
|
- data/regimes/pt.json
|
|
85
|
+
- data/regimes/se.json
|
|
86
|
+
- data/regimes/sg.json
|
|
84
87
|
- data/regimes/us.json
|
|
85
88
|
- lib/generated/gobl/bill/charge.rb
|
|
86
89
|
- lib/generated/gobl/bill/correction_options.rb
|
|
@@ -166,6 +169,7 @@ files:
|
|
|
166
169
|
- lib/generated/gobl/tax/correction_set.rb
|
|
167
170
|
- lib/generated/gobl/tax/extensions.rb
|
|
168
171
|
- lib/generated/gobl/tax/identity.rb
|
|
172
|
+
- lib/generated/gobl/tax/key_def.rb
|
|
169
173
|
- lib/generated/gobl/tax/rate_def.rb
|
|
170
174
|
- lib/generated/gobl/tax/rate_total.rb
|
|
171
175
|
- lib/generated/gobl/tax/rate_total_surcharge.rb
|