gobl 0.15.2 → 0.16.0
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/co.json +18 -17
- data/data/regimes/es.json +95 -96
- data/data/regimes/fr.json +1 -0
- data/data/regimes/gb.json +1 -0
- data/data/regimes/it.json +816 -1944
- data/data/regimes/mx.json +576 -0
- data/data/regimes/nl.json +1 -0
- data/data/regimes/pt.json +206 -317
- data/data/regimes/us.json +1 -0
- data/lib/generated/gobl/bill/charge.rb +1 -1
- data/lib/generated/gobl/bill/correction_options.rb +52 -0
- data/lib/generated/gobl/bill/delivery.rb +1 -1
- data/lib/generated/gobl/bill/discount.rb +1 -1
- data/lib/generated/gobl/bill/document_reference.rb +1 -1
- data/lib/generated/gobl/bill/invoice.rb +31 -34
- data/lib/generated/gobl/bill/line.rb +1 -1
- data/lib/generated/gobl/bill/line_charge.rb +1 -1
- data/lib/generated/gobl/bill/line_discount.rb +1 -1
- data/lib/generated/gobl/bill/ordering.rb +1 -1
- data/lib/generated/gobl/bill/outlay.rb +1 -1
- data/lib/generated/gobl/bill/payment.rb +1 -1
- data/lib/generated/gobl/bill/preceding.rb +1 -1
- data/lib/generated/gobl/bill/tax.rb +1 -1
- data/lib/generated/gobl/bill/totals.rb +1 -1
- data/lib/generated/gobl/cal/date.rb +1 -1
- data/lib/generated/gobl/cal/period.rb +1 -1
- data/lib/generated/gobl/cbc/code.rb +1 -1
- data/lib/generated/gobl/cbc/code_map.rb +15 -0
- data/lib/generated/gobl/cbc/key.rb +1 -1
- data/lib/generated/gobl/cbc/meta.rb +1 -1
- data/lib/generated/gobl/cbc/note.rb +1 -1
- data/lib/generated/gobl/cbc/stamp.rb +1 -1
- data/lib/generated/gobl/currency/code.rb +1 -1
- data/lib/generated/gobl/currency/exchange_rate.rb +1 -1
- data/lib/generated/gobl/document.rb +1 -1
- data/lib/generated/gobl/dsig/digest.rb +1 -1
- data/lib/generated/gobl/dsig/signature.rb +1 -1
- data/lib/generated/gobl/envelope.rb +1 -1
- data/lib/generated/gobl/header.rb +1 -1
- data/lib/generated/gobl/i18n/string.rb +1 -1
- data/lib/generated/gobl/l10n/code.rb +1 -1
- data/lib/generated/gobl/l10n/country_code.rb +1 -1
- data/lib/generated/gobl/note/message.rb +1 -1
- data/lib/generated/gobl/org/address.rb +1 -1
- data/lib/generated/gobl/org/coordinates.rb +2 -2
- data/lib/generated/gobl/org/email.rb +1 -1
- data/lib/generated/gobl/org/identity.rb +7 -2
- data/lib/generated/gobl/org/image.rb +1 -1
- data/lib/generated/gobl/org/inbox.rb +1 -1
- data/lib/generated/gobl/org/item.rb +8 -3
- data/lib/generated/gobl/org/name.rb +1 -1
- data/lib/generated/gobl/org/party.rb +18 -13
- data/lib/generated/gobl/org/person.rb +1 -1
- data/lib/generated/gobl/org/registration.rb +1 -1
- data/lib/generated/gobl/org/telephone.rb +1 -1
- data/lib/generated/gobl/org/unit.rb +4 -1
- data/lib/generated/gobl/org/website.rb +2 -2
- data/lib/generated/gobl/pay/advance.rb +1 -1
- data/lib/generated/gobl/pay/card.rb +1 -1
- data/lib/generated/gobl/pay/credit_transfer.rb +1 -1
- data/lib/generated/gobl/pay/direct_debit.rb +1 -1
- data/lib/generated/gobl/pay/due_date.rb +1 -1
- data/lib/generated/gobl/pay/instructions.rb +1 -1
- data/lib/generated/gobl/pay/online.rb +1 -1
- data/lib/generated/gobl/pay/terms.rb +2 -3
- data/lib/generated/gobl/tax/category.rb +10 -5
- data/lib/generated/gobl/tax/category_total.rb +1 -1
- data/lib/generated/gobl/tax/code_definition.rb +33 -0
- data/lib/generated/gobl/tax/combo.rb +6 -1
- data/lib/generated/gobl/tax/identity.rb +1 -1
- data/lib/generated/gobl/tax/key_definition.rb +8 -8
- data/lib/generated/gobl/tax/preceding_definitions.rb +1 -1
- data/lib/generated/gobl/tax/rate.rb +10 -5
- data/lib/generated/gobl/tax/rate_total.rb +6 -1
- data/lib/generated/gobl/tax/rate_total_surcharge.rb +1 -1
- data/lib/generated/gobl/tax/rate_value.rb +1 -1
- data/lib/generated/gobl/tax/regime.rb +12 -1
- data/lib/generated/gobl/tax/scenario.rb +3 -3
- data/lib/generated/gobl/tax/scenario_set.rb +1 -1
- data/lib/generated/gobl/tax/set.rb +1 -1
- data/lib/generated/gobl/tax/total.rb +1 -1
- data/lib/generated/gobl/tax/zone.rb +3 -3
- data/lib/generated/gobl/uuid/uuid.rb +1 -1
- data/lib/gobl/operations.rb +2 -3
- data/lib/gobl/version.rb +1 -1
- metadata +5 -2
data/data/regimes/us.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
|
5
|
+
##
|
|
6
|
+
## Generated with GOBL v0.55.0
|
|
7
|
+
##
|
|
8
|
+
|
|
9
|
+
module GOBL
|
|
10
|
+
module Bill
|
|
11
|
+
# CorrectionOptions defines a structure used to pass configuration options to correct a previous invoice.
|
|
12
|
+
class CorrectionOptions < GOBL::Object
|
|
13
|
+
# The Schema ID of the GOBL CorrectionOptions structure
|
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/bill/correction-options'
|
|
15
|
+
|
|
16
|
+
# @!attribute [r] issue_date
|
|
17
|
+
# When the new corrective invoice's issue date should be set to.
|
|
18
|
+
# @return [GOBL::Cal::Date]
|
|
19
|
+
property :issue_date, GOBL::Cal::Date
|
|
20
|
+
|
|
21
|
+
# @!attribute [r] stamps
|
|
22
|
+
# Stamps of the previous document to include in the preceding data.
|
|
23
|
+
# @return [Array<GOBL::CBC::Stamp>]
|
|
24
|
+
property :stamps, [GOBL::CBC::Stamp]
|
|
25
|
+
|
|
26
|
+
# @!attribute [r] credit
|
|
27
|
+
# Credit when true indicates that the corrective document should cancel the previous document.
|
|
28
|
+
# @return [Boolean]
|
|
29
|
+
property :credit, Boolean
|
|
30
|
+
|
|
31
|
+
# @!attribute [r] debit
|
|
32
|
+
# Debit when true indicates that the corrective document should add new items to the previous document.
|
|
33
|
+
# @return [Boolean]
|
|
34
|
+
property :debit, Boolean
|
|
35
|
+
|
|
36
|
+
# @!attribute [r] reason
|
|
37
|
+
# Human readable reason for the corrective operation.
|
|
38
|
+
# @return [String]
|
|
39
|
+
property :reason, String
|
|
40
|
+
|
|
41
|
+
# @!attribute [r] correction_method
|
|
42
|
+
# Correction method as defined by the tax regime.
|
|
43
|
+
# @return [GOBL::CBC::Key]
|
|
44
|
+
property :correction_method, GOBL::CBC::Key
|
|
45
|
+
|
|
46
|
+
# @!attribute [r] corrections
|
|
47
|
+
# Correction keys that describe the specific changes according to the tax regime.
|
|
48
|
+
# @return [Array<GOBL::CBC::Key>]
|
|
49
|
+
property :corrections, [GOBL::CBC::Key]
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -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.55.0
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
module GOBL
|
|
@@ -18,17 +18,6 @@ module GOBL
|
|
|
18
18
|
# @return [GOBL::UUID::UUID]
|
|
19
19
|
property :uuid, GOBL::UUID::UUID
|
|
20
20
|
|
|
21
|
-
# @!attribute [r] series
|
|
22
|
-
# Used as a prefix to group codes.
|
|
23
|
-
# @return [String]
|
|
24
|
-
property :series, String
|
|
25
|
-
|
|
26
|
-
# @!attribute [r] code
|
|
27
|
-
# Sequential code used to identify this invoice in tax declarations.
|
|
28
|
-
# @return [String]
|
|
29
|
-
property :code, String
|
|
30
|
-
validates_presence_of :code
|
|
31
|
-
|
|
32
21
|
# Enumeration of possible values for {#type} with their corresponding descriptions
|
|
33
22
|
TYPE_ENUM = {
|
|
34
23
|
'standard' => 'A regular commercial invoice document between a supplier and customer.',
|
|
@@ -42,35 +31,23 @@ module GOBL
|
|
|
42
31
|
# Type of invoice document subject to the requirements of the local tax regime.
|
|
43
32
|
# @return [GOBL::CBC::Key]
|
|
44
33
|
property :type, GOBL::CBC::Key
|
|
45
|
-
|
|
46
|
-
validates_inclusion_of :type, in: TYPE_ENUM.keys
|
|
34
|
+
validates_inclusion_of :type, in: TYPE_ENUM.keys, allow_blank: true
|
|
47
35
|
|
|
48
|
-
# @!attribute [r]
|
|
49
|
-
#
|
|
50
|
-
# @return [
|
|
51
|
-
property :
|
|
52
|
-
validates_presence_of :currency
|
|
53
|
-
|
|
54
|
-
# @!attribute [r] exchange_rates
|
|
55
|
-
# Exchange rates to be used when converting the invoices monetary values into other currencies.
|
|
56
|
-
# @return [Array<GOBL::Currency::ExchangeRate>]
|
|
57
|
-
property :exchange_rates, [GOBL::Currency::ExchangeRate]
|
|
58
|
-
|
|
59
|
-
# @!attribute [r] tax
|
|
60
|
-
# Special tax configuration for billing.
|
|
61
|
-
# @return [Tax]
|
|
62
|
-
property :tax, Tax
|
|
36
|
+
# @!attribute [r] series
|
|
37
|
+
# Used as a prefix to group codes.
|
|
38
|
+
# @return [String]
|
|
39
|
+
property :series, String
|
|
63
40
|
|
|
64
|
-
# @!attribute [r]
|
|
65
|
-
#
|
|
66
|
-
# @return [
|
|
67
|
-
property :
|
|
41
|
+
# @!attribute [r] code
|
|
42
|
+
# Sequential code used to identify this invoice in tax declarations.
|
|
43
|
+
# @return [String]
|
|
44
|
+
property :code, String
|
|
45
|
+
validates_presence_of :code
|
|
68
46
|
|
|
69
47
|
# @!attribute [r] issue_date
|
|
70
48
|
# When the invoice was created.
|
|
71
49
|
# @return [GOBL::Cal::Date]
|
|
72
50
|
property :issue_date, GOBL::Cal::Date
|
|
73
|
-
validates_presence_of :issue_date
|
|
74
51
|
|
|
75
52
|
# @!attribute [r] op_date
|
|
76
53
|
# Date when the operation defined by the invoice became effective.
|
|
@@ -82,6 +59,26 @@ module GOBL
|
|
|
82
59
|
# @return [GOBL::Cal::Date]
|
|
83
60
|
property :value_date, GOBL::Cal::Date
|
|
84
61
|
|
|
62
|
+
# @!attribute [r] currency
|
|
63
|
+
# Currency for all invoice totals.
|
|
64
|
+
# @return [GOBL::Currency::Code]
|
|
65
|
+
property :currency, GOBL::Currency::Code
|
|
66
|
+
|
|
67
|
+
# @!attribute [r] exchange_rates
|
|
68
|
+
# Exchange rates to be used when converting the invoices monetary values into other currencies.
|
|
69
|
+
# @return [Array<GOBL::Currency::ExchangeRate>]
|
|
70
|
+
property :exchange_rates, [GOBL::Currency::ExchangeRate]
|
|
71
|
+
|
|
72
|
+
# @!attribute [r] preceding
|
|
73
|
+
# Key information regarding previous invoices and potentially details as to why they were corrected.
|
|
74
|
+
# @return [Array<Preceding>]
|
|
75
|
+
property :preceding, [Preceding]
|
|
76
|
+
|
|
77
|
+
# @!attribute [r] tax
|
|
78
|
+
# Special tax configuration for billing.
|
|
79
|
+
# @return [Tax]
|
|
80
|
+
property :tax, Tax
|
|
81
|
+
|
|
85
82
|
# @!attribute [r] supplier
|
|
86
83
|
# The taxable entity supplying the goods or services.
|
|
87
84
|
# @return [GOBL::Org::Party]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
|
5
|
+
##
|
|
6
|
+
## Generated with GOBL v0.55.0
|
|
7
|
+
##
|
|
8
|
+
|
|
9
|
+
module GOBL
|
|
10
|
+
module CBC
|
|
11
|
+
# CodeMap is a map of keys to specific codes, useful to determine regime specific codes from their key counterparts.
|
|
12
|
+
class CodeMap < GOBL::Map
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -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.55.0
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
module GOBL
|
|
@@ -24,7 +24,7 @@ module GOBL
|
|
|
24
24
|
property :lon, Float
|
|
25
25
|
|
|
26
26
|
# @!attribute [r] w3w
|
|
27
|
-
#
|
|
27
|
+
# What 3 Words text coordinates.
|
|
28
28
|
# @return [String]
|
|
29
29
|
property :w3w, String
|
|
30
30
|
|
|
@@ -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.55.0
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
module GOBL
|
|
@@ -24,7 +24,7 @@ module GOBL
|
|
|
24
24
|
property :label, String
|
|
25
25
|
|
|
26
26
|
# @!attribute [r] type
|
|
27
|
-
# The type of Code being represented and usually specific for a particular context, country, or tax regime.
|
|
27
|
+
# The type of Code being represented and usually specific for a particular context, country, or tax regime, and cannot be used alongside the key.
|
|
28
28
|
# @return [GOBL::CBC::Code]
|
|
29
29
|
property :type, GOBL::CBC::Code
|
|
30
30
|
|
|
@@ -33,6 +33,11 @@ module GOBL
|
|
|
33
33
|
# @return [GOBL::CBC::Code]
|
|
34
34
|
property :code, GOBL::CBC::Code
|
|
35
35
|
validates_presence_of :code
|
|
36
|
+
|
|
37
|
+
# @!attribute [r] description
|
|
38
|
+
# Description adds details about what the code could mean or imply
|
|
39
|
+
# @return [String]
|
|
40
|
+
property :description, String
|
|
36
41
|
end
|
|
37
42
|
end
|
|
38
43
|
end
|
|
@@ -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.55.0
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
module GOBL
|
|
@@ -46,8 +46,8 @@ module GOBL
|
|
|
46
46
|
|
|
47
47
|
# @!attribute [r] currency
|
|
48
48
|
# Currency used for the item's price.
|
|
49
|
-
# @return [
|
|
50
|
-
property :currency,
|
|
49
|
+
# @return [GOBL::Currency::Code]
|
|
50
|
+
property :currency, GOBL::Currency::Code
|
|
51
51
|
|
|
52
52
|
# @!attribute [r] price
|
|
53
53
|
# Base price of a single unit to be sold.
|
|
@@ -65,6 +65,11 @@ module GOBL
|
|
|
65
65
|
# @return [GOBL::L10n::CountryCode]
|
|
66
66
|
property :origin, GOBL::L10n::CountryCode
|
|
67
67
|
|
|
68
|
+
# @!attribute [r] ext
|
|
69
|
+
# Extension code map for any additional regime specific codes that may be required.
|
|
70
|
+
# @return [GOBL::CBC::CodeMap]
|
|
71
|
+
property :ext, GOBL::CBC::CodeMap
|
|
72
|
+
|
|
68
73
|
# @!attribute [r] meta
|
|
69
74
|
# Additional meta information that may be useful
|
|
70
75
|
# @return [GOBL::CBC::Meta]
|