gobl 0.21.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/data/regimes/at.json +55 -50
- data/data/regimes/be.json +55 -50
- data/data/regimes/ca.json +1 -1
- data/data/regimes/ch.json +55 -50
- data/data/regimes/co.json +113 -61
- data/data/regimes/de.json +61 -47
- data/data/regimes/el.json +204 -0
- data/data/regimes/es.json +66 -548
- data/data/regimes/fr.json +55 -50
- data/data/regimes/gb.json +59 -50
- data/data/regimes/it.json +60 -1311
- data/data/regimes/mx.json +38 -639
- data/data/regimes/nl.json +55 -50
- data/data/regimes/pl.json +103 -100
- data/data/regimes/pt.json +17 -349
- data/data/regimes/us.json +55 -50
- data/lib/generated/gobl/bill/correction_options.rb +2 -2
- data/lib/generated/gobl/bill/invoice.rb +49 -9
- data/lib/generated/gobl/bill/ordering.rb +34 -34
- data/lib/generated/gobl/bill/tax.rb +0 -5
- data/lib/generated/gobl/cbc/key_definition.rb +4 -9
- data/lib/generated/gobl/cbc/value_definition.rb +37 -0
- data/lib/generated/gobl/head/header.rb +5 -5
- data/lib/generated/gobl/head/link.rb +43 -0
- data/lib/generated/gobl/l10n/{country_code.rb → iso_country_code.rb} +3 -3
- data/lib/generated/gobl/l10n/tax_country_code.rb +277 -0
- data/lib/generated/gobl/org/address.rb +2 -3
- data/lib/generated/gobl/org/document_ref.rb +87 -0
- data/lib/generated/gobl/org/identity.rb +5 -0
- data/lib/generated/gobl/org/item.rb +2 -2
- data/lib/generated/gobl/org/name.rb +0 -2
- data/lib/generated/gobl/org/party.rb +5 -6
- data/lib/generated/gobl/org/person.rb +5 -0
- data/lib/generated/gobl/org/registration.rb +4 -0
- data/lib/generated/gobl/pay/advance.rb +5 -0
- data/lib/generated/gobl/pay/instructions.rb +5 -0
- data/lib/generated/gobl/tax/addon_def.rb +61 -0
- data/lib/generated/gobl/tax/{category.rb → category_def.rb} +11 -11
- data/lib/generated/gobl/tax/combo.rb +5 -0
- data/lib/generated/gobl/tax/correction_definition.rb +1 -1
- data/lib/generated/gobl/tax/correction_set.rb +13 -0
- data/lib/generated/gobl/tax/identity.rb +3 -3
- data/lib/generated/gobl/tax/{rate.rb → rate_def.rb} +11 -16
- data/lib/generated/gobl/tax/rate_total.rb +5 -0
- data/lib/generated/gobl/tax/{rate_value.rb → rate_value_def.rb} +4 -4
- data/lib/generated/gobl/tax/{regime.rb → regime_def.rb} +23 -13
- data/lib/generated/gobl/tax/scenario.rb +20 -10
- data/lib/generated/gobl/tax/scenario_set.rb +1 -1
- data/lib/generated/gobl/tax/source.rb +1 -1
- data/lib/generated/gobl/tax/tag_set.rb +28 -0
- 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 +15 -11
- data/lib/generated/gobl/bill/document_reference.rb +0 -36
- data/lib/generated/gobl/bill/preceding.rb +0 -78
- data/lib/generated/gobl/cbc/code_definition.rb +0 -37
- data/lib/gobl/extensions/bill/scenario_summary.rb +0 -25
@@ -14,8 +14,8 @@ module GOBL
|
|
14
14
|
|
15
15
|
# @!attribute [r] code
|
16
16
|
# Identifier assigned by the customer or buyer for internal routing purposes.
|
17
|
-
# @return [
|
18
|
-
property :code,
|
17
|
+
# @return [GOBL::CBC::Code]
|
18
|
+
property :code, GOBL::CBC::Code
|
19
19
|
|
20
20
|
# @!attribute [r] identities
|
21
21
|
# Any additional Codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
|
@@ -27,50 +27,50 @@ module GOBL
|
|
27
27
|
# @return [GOBL::Cal::Period]
|
28
28
|
property :period, GOBL::Cal::Period
|
29
29
|
|
30
|
-
# @!attribute [r]
|
31
|
-
#
|
32
|
-
# @return [
|
33
|
-
property :
|
30
|
+
# @!attribute [r] buyer
|
31
|
+
# Party who is responsible for making the purchase, but is not responsible for handling taxes.
|
32
|
+
# @return [GOBL::Org::Party]
|
33
|
+
property :buyer, GOBL::Org::Party
|
34
|
+
|
35
|
+
# @!attribute [r] seller
|
36
|
+
# Party who is selling the goods but is not responsible for taxes like the supplier.
|
37
|
+
# @return [GOBL::Org::Party]
|
38
|
+
property :seller, GOBL::Org::Party
|
39
|
+
|
40
|
+
# @!attribute [r] projects
|
41
|
+
# Projects this invoice refers to.
|
42
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
43
|
+
property :projects, [GOBL::Org::DocumentRef]
|
34
44
|
|
35
|
-
# @!attribute [r]
|
36
|
-
# The identification of
|
37
|
-
# @return [
|
38
|
-
property :
|
45
|
+
# @!attribute [r] contracts
|
46
|
+
# The identification of contracts.
|
47
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
48
|
+
property :contracts, [GOBL::Org::DocumentRef]
|
39
49
|
|
40
|
-
# @!attribute [r]
|
41
|
-
# Purchase
|
42
|
-
# @return [
|
43
|
-
property :
|
50
|
+
# @!attribute [r] purchases
|
51
|
+
# Purchase orders issued by the customer or buyer.
|
52
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
53
|
+
property :purchases, [GOBL::Org::DocumentRef]
|
44
54
|
|
45
|
-
# @!attribute [r]
|
46
|
-
# Sales
|
47
|
-
# @return [
|
48
|
-
property :
|
55
|
+
# @!attribute [r] sales
|
56
|
+
# Sales orders issued by the supplier or seller.
|
57
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
58
|
+
property :sales, [GOBL::Org::DocumentRef]
|
49
59
|
|
50
60
|
# @!attribute [r] receiving
|
51
61
|
# Receiving Advice.
|
52
|
-
# @return [
|
53
|
-
property :receiving,
|
62
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
63
|
+
property :receiving, [GOBL::Org::DocumentRef]
|
54
64
|
|
55
65
|
# @!attribute [r] despatch
|
56
66
|
# Despatch advice.
|
57
|
-
# @return [
|
58
|
-
property :despatch,
|
67
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
68
|
+
property :despatch, [GOBL::Org::DocumentRef]
|
59
69
|
|
60
70
|
# @!attribute [r] tender
|
61
71
|
# Tender advice, the identification of the call for tender or lot the invoice relates to.
|
62
|
-
# @return [
|
63
|
-
property :tender,
|
64
|
-
|
65
|
-
# @!attribute [r] buyer
|
66
|
-
# Party who is responsible for making the purchase, but is not responsible for handling taxes.
|
67
|
-
# @return [GOBL::Org::Party]
|
68
|
-
property :buyer, GOBL::Org::Party
|
69
|
-
|
70
|
-
# @!attribute [r] seller
|
71
|
-
# Party who is selling the goods but is not responsible for taxes like the supplier.
|
72
|
-
# @return [GOBL::Org::Party]
|
73
|
-
property :seller, GOBL::Org::Party
|
72
|
+
# @return [Array<GOBL::Org::DocumentRef>]
|
73
|
+
property :tender, [GOBL::Org::DocumentRef]
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -17,11 +17,6 @@ module GOBL
|
|
17
17
|
# @return [GOBL::CBC::Code]
|
18
18
|
property :prices_include, GOBL::CBC::Code
|
19
19
|
|
20
|
-
# @!attribute [r] tags
|
21
|
-
# Special tax tags that apply to this invoice according to local requirements.
|
22
|
-
# @return [Array<GOBL::CBC::Key>]
|
23
|
-
property :tags, [GOBL::CBC::Key]
|
24
|
-
|
25
20
|
# @!attribute [r] ext
|
26
21
|
# Additional extensions that are applied to the invoice as a whole as opposed to specific sections.
|
27
22
|
# @return [GOBL::Tax::Extensions]
|
@@ -34,15 +34,10 @@ module GOBL
|
|
34
34
|
# @return [GOBL::CBC::Meta]
|
35
35
|
property :meta, GOBL::CBC::Meta
|
36
36
|
|
37
|
-
# @!attribute [r]
|
38
|
-
#
|
39
|
-
# @return [Array<GOBL::CBC::
|
40
|
-
property :
|
41
|
-
|
42
|
-
# @!attribute [r] keys
|
43
|
-
# Keys is used instead of codes to define a further sub-set of keys that can be used alongside this one.
|
44
|
-
# @return [Array<GOBL::CBC::KeyDefinition>]
|
45
|
-
property :keys, [GOBL::CBC::KeyDefinition]
|
37
|
+
# @!attribute [r] values
|
38
|
+
# Values defines the possible values associated with the key.
|
39
|
+
# @return [Array<GOBL::CBC::ValueDefinition>]
|
40
|
+
property :values, [GOBL::CBC::ValueDefinition]
|
46
41
|
|
47
42
|
# @!attribute [r] pattern
|
48
43
|
# Pattern is used to validate the key value instead of using a fixed value from the code or key definitions.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module CBC
|
10
|
+
# ValueDefinition describes a specific value and how it maps to a human name and description if appropriate.
|
11
|
+
class ValueDefinition < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL ValueDefinition structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/cbc/value-definition'
|
14
|
+
|
15
|
+
# @!attribute [r] value
|
16
|
+
# Value for which the definition is for.
|
17
|
+
# @return [String]
|
18
|
+
property :value, String
|
19
|
+
validates_presence_of :value
|
20
|
+
|
21
|
+
# @!attribute [r] name
|
22
|
+
# Short name for the value, if relevant.
|
23
|
+
# @return [GOBL::I18n::String]
|
24
|
+
property :name, GOBL::I18n::String
|
25
|
+
|
26
|
+
# @!attribute [r] desc
|
27
|
+
# Description offering more details about when the value should be used.
|
28
|
+
# @return [GOBL::I18n::String]
|
29
|
+
property :desc, GOBL::I18n::String
|
30
|
+
|
31
|
+
# @!attribute [r] meta
|
32
|
+
# Meta defines any additional details that may be useful or associated with the value.
|
33
|
+
# @return [GOBL::CBC::Meta]
|
34
|
+
property :meta, GOBL::CBC::Meta
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -29,6 +29,11 @@ module GOBL
|
|
29
29
|
# @return [Array<GOBL::Head::Stamp>]
|
30
30
|
property :stamps, [GOBL::Head::Stamp]
|
31
31
|
|
32
|
+
# @!attribute [r] links
|
33
|
+
# Links provide URLs to other resources that are related to this envelope and unlike stamps can be added even in the draft state.
|
34
|
+
# @return [Array<GOBL::Head::Link>]
|
35
|
+
property :links, [GOBL::Head::Link]
|
36
|
+
|
32
37
|
# @!attribute [r] tags
|
33
38
|
# Set of labels that describe but have no influence on the data.
|
34
39
|
# @return [Array<String>]
|
@@ -43,11 +48,6 @@ module GOBL
|
|
43
48
|
# Any information that may be relevant to other humans about this envelope
|
44
49
|
# @return [String]
|
45
50
|
property :notes, String
|
46
|
-
|
47
|
-
# @!attribute [r] draft
|
48
|
-
# When true, implies that this document should not be considered final. Digital signatures are optional.
|
49
|
-
# @return [Boolean]
|
50
|
-
property :draft, Boolean
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module Head
|
10
|
+
# Link defines a link between this document and another resource.
|
11
|
+
class Link < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL Link structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/head/link'
|
14
|
+
|
15
|
+
# @!attribute [r] key
|
16
|
+
# Key is a unique identifier for the link.
|
17
|
+
# @return [GOBL::CBC::Key]
|
18
|
+
property :key, GOBL::CBC::Key
|
19
|
+
validates_presence_of :key
|
20
|
+
|
21
|
+
# @!attribute [r] title
|
22
|
+
# Title of the resource to use when presenting to users.
|
23
|
+
# @return [String]
|
24
|
+
property :title, String
|
25
|
+
|
26
|
+
# @!attribute [r] description
|
27
|
+
# Description of the resource to use when presenting to users.
|
28
|
+
# @return [String]
|
29
|
+
property :description, String
|
30
|
+
|
31
|
+
# @!attribute [r] mime
|
32
|
+
# Expected MIME type of the link's content.
|
33
|
+
# @return [String]
|
34
|
+
property :mime, String
|
35
|
+
|
36
|
+
# @!attribute [r] url
|
37
|
+
# URL of the resource.
|
38
|
+
# @return [String]
|
39
|
+
property :url, String
|
40
|
+
validates_presence_of :url
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -8,9 +8,9 @@
|
|
8
8
|
module GOBL
|
9
9
|
module L10n
|
10
10
|
# Defines an ISO 3166-2 country code
|
11
|
-
class
|
12
|
-
# The Schema ID of the GOBL
|
13
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/l10n/country-code'
|
11
|
+
class ISOCountryCode < String
|
12
|
+
# The Schema ID of the GOBL ISOCountryCode structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/l10n/iso-country-code'
|
14
14
|
|
15
15
|
include GOBL::Enum
|
16
16
|
|
@@ -0,0 +1,277 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module L10n
|
10
|
+
# Defines an ISO base country code used for tax purposes
|
11
|
+
class TaxCountryCode < String
|
12
|
+
# The Schema ID of the GOBL TaxCountryCode structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/l10n/tax-country-code'
|
14
|
+
|
15
|
+
include GOBL::Enum
|
16
|
+
|
17
|
+
ENUM = {
|
18
|
+
'AF' => 'Afghanistan',
|
19
|
+
'AX' => 'Åland Islands',
|
20
|
+
'AL' => 'Albania',
|
21
|
+
'DZ' => 'Algeria',
|
22
|
+
'AS' => 'American Samoa',
|
23
|
+
'AD' => 'Andorra',
|
24
|
+
'AO' => 'Angola',
|
25
|
+
'AI' => 'Anguilla',
|
26
|
+
'AQ' => 'Antarctica',
|
27
|
+
'AG' => 'Antigua and Barbuda',
|
28
|
+
'AR' => 'Argentina',
|
29
|
+
'AM' => 'Armenia',
|
30
|
+
'AW' => 'Aruba',
|
31
|
+
'AU' => 'Australia',
|
32
|
+
'AT' => 'Austria',
|
33
|
+
'AZ' => 'Azerbaijan',
|
34
|
+
'BS' => 'Bahamas',
|
35
|
+
'BH' => 'Bahrain',
|
36
|
+
'BD' => 'Bangladesh',
|
37
|
+
'BB' => 'Barbados',
|
38
|
+
'BY' => 'Belarus',
|
39
|
+
'BE' => 'Belgium',
|
40
|
+
'BZ' => 'Belize',
|
41
|
+
'BJ' => 'Benin',
|
42
|
+
'BM' => 'Bermuda',
|
43
|
+
'BT' => 'Bhutan',
|
44
|
+
'BO' => 'Bolivia, Plurinational State of',
|
45
|
+
'BQ' => 'Bonaire, Sint Eustatius and Saba',
|
46
|
+
'BA' => 'Bosnia and Herzegovina',
|
47
|
+
'BW' => 'Botswana',
|
48
|
+
'BV' => 'Bouvet Island',
|
49
|
+
'BR' => 'Brazil',
|
50
|
+
'IO' => 'British Indian Ocean Territory',
|
51
|
+
'BN' => 'Brunei Darussalam',
|
52
|
+
'BG' => 'Bulgaria',
|
53
|
+
'BF' => 'Burkina Faso',
|
54
|
+
'BI' => 'Burundi',
|
55
|
+
'CV' => 'Cabo Verde',
|
56
|
+
'KH' => 'Cambodia',
|
57
|
+
'CM' => 'Cameroon',
|
58
|
+
'CA' => 'Canada',
|
59
|
+
'KY' => 'Cayman Islands',
|
60
|
+
'CF' => 'Central African Republic',
|
61
|
+
'TD' => 'Chad',
|
62
|
+
'CL' => 'Chile',
|
63
|
+
'CN' => 'China',
|
64
|
+
'CX' => 'Christmas Island',
|
65
|
+
'CC' => 'Cocos (Keeling) Islands',
|
66
|
+
'CO' => 'Colombia',
|
67
|
+
'KM' => 'Comoros',
|
68
|
+
'CG' => 'Congo',
|
69
|
+
'CD' => 'Congo, Democratic Republic of the',
|
70
|
+
'CK' => 'Cook Islands',
|
71
|
+
'CR' => 'Costa Rica',
|
72
|
+
'CI' => 'Côte dIvoireIvoire',
|
73
|
+
'HR' => 'Croatia',
|
74
|
+
'CU' => 'Cuba',
|
75
|
+
'CW' => 'Curaçao',
|
76
|
+
'CY' => 'Cyprus',
|
77
|
+
'CZ' => 'Czechia',
|
78
|
+
'DK' => 'Denmark',
|
79
|
+
'DJ' => 'Djibouti',
|
80
|
+
'DM' => 'Dominica',
|
81
|
+
'DO' => 'Dominican Republic',
|
82
|
+
'EC' => 'Ecuador',
|
83
|
+
'EG' => 'Egypt',
|
84
|
+
'SV' => 'El Salvador',
|
85
|
+
'GQ' => 'Equatorial Guinea',
|
86
|
+
'ER' => 'Eritrea',
|
87
|
+
'EE' => 'Estonia',
|
88
|
+
'SZ' => 'Eswatini',
|
89
|
+
'ET' => 'Ethiopia',
|
90
|
+
'FK' => 'Falkland Islands',
|
91
|
+
'FO' => 'Faroe Islands',
|
92
|
+
'FJ' => 'Fiji',
|
93
|
+
'FI' => 'Finland',
|
94
|
+
'FR' => 'France',
|
95
|
+
'GF' => 'French Guiana',
|
96
|
+
'PF' => 'French Polynesia',
|
97
|
+
'TF' => 'French Southern Territories',
|
98
|
+
'GA' => 'Gabon',
|
99
|
+
'GM' => 'Gambia',
|
100
|
+
'GE' => 'Georgia',
|
101
|
+
'DE' => 'Germany',
|
102
|
+
'GH' => 'Ghana',
|
103
|
+
'GI' => 'Gibraltar',
|
104
|
+
'GL' => 'Greenland',
|
105
|
+
'GD' => 'Grenada',
|
106
|
+
'GP' => 'Guadeloupe',
|
107
|
+
'GU' => 'Guam',
|
108
|
+
'GT' => 'Guatemala',
|
109
|
+
'GG' => 'Guernsey',
|
110
|
+
'GN' => 'Guinea',
|
111
|
+
'GW' => 'Guinea-Bissau',
|
112
|
+
'GY' => 'Guyana',
|
113
|
+
'HT' => 'Haiti',
|
114
|
+
'HM' => 'Heard Island and McDonald Islands',
|
115
|
+
'VA' => 'Holy See (the)',
|
116
|
+
'HN' => 'Honduras',
|
117
|
+
'HK' => 'Hong Kong',
|
118
|
+
'HU' => 'Hungary',
|
119
|
+
'IS' => 'Iceland',
|
120
|
+
'IN' => 'India',
|
121
|
+
'ID' => 'Indonesia',
|
122
|
+
'IR' => 'Iran, Islamic Republic of',
|
123
|
+
'IQ' => 'Iraq',
|
124
|
+
'IE' => 'Ireland',
|
125
|
+
'IM' => 'Isle of Man',
|
126
|
+
'IL' => 'Israel',
|
127
|
+
'IT' => 'Italy',
|
128
|
+
'JM' => 'Jamaica',
|
129
|
+
'JP' => 'Japan',
|
130
|
+
'JE' => 'Jersey',
|
131
|
+
'JO' => 'Jordan',
|
132
|
+
'KZ' => 'Kazakhstan',
|
133
|
+
'KE' => 'Kenya',
|
134
|
+
'KI' => 'Kiribati',
|
135
|
+
'KP' => 'Korea, Democratic Peoples Republic ofs Republic of',
|
136
|
+
'KR' => 'Korea, Republic of',
|
137
|
+
'KW' => 'Kuwait',
|
138
|
+
'KG' => 'Kyrgyzstan',
|
139
|
+
'LA' => 'Lao Peoples Democratic Republics Democratic Republic',
|
140
|
+
'LV' => 'Latvia',
|
141
|
+
'LB' => 'Lebanon',
|
142
|
+
'LS' => 'Lesotho',
|
143
|
+
'LR' => 'Liberia',
|
144
|
+
'LY' => 'Libya',
|
145
|
+
'LI' => 'Liechtenstein',
|
146
|
+
'LT' => 'Lithuania',
|
147
|
+
'LU' => 'Luxembourg',
|
148
|
+
'MO' => 'Macao',
|
149
|
+
'MK' => 'North Macedonia',
|
150
|
+
'MG' => 'Madagascar',
|
151
|
+
'MW' => 'Malawi',
|
152
|
+
'MY' => 'Malaysia',
|
153
|
+
'MV' => 'Maldives',
|
154
|
+
'ML' => 'Mali',
|
155
|
+
'MT' => 'Malta',
|
156
|
+
'MH' => 'Marshall Islands',
|
157
|
+
'MQ' => 'Martinique',
|
158
|
+
'MR' => 'Mauritania',
|
159
|
+
'MU' => 'Mauritius',
|
160
|
+
'YT' => 'Mayotte',
|
161
|
+
'MX' => 'Mexico',
|
162
|
+
'FM' => 'Micronesia, Federated States of',
|
163
|
+
'MD' => 'Moldova, Republic of',
|
164
|
+
'MC' => 'Monaco',
|
165
|
+
'MN' => 'Mongolia',
|
166
|
+
'ME' => 'Montenegro',
|
167
|
+
'MS' => 'Montserrat',
|
168
|
+
'MA' => 'Morocco',
|
169
|
+
'MZ' => 'Mozambique',
|
170
|
+
'MM' => 'Myanmar',
|
171
|
+
'NA' => 'Namibia',
|
172
|
+
'NR' => 'Nauru',
|
173
|
+
'NP' => 'Nepal',
|
174
|
+
'NL' => 'Netherlands',
|
175
|
+
'NC' => 'New Caledonia',
|
176
|
+
'NZ' => 'New Zealand',
|
177
|
+
'NI' => 'Nicaragua',
|
178
|
+
'NE' => 'Niger',
|
179
|
+
'NG' => 'Nigeria',
|
180
|
+
'NU' => 'Niue',
|
181
|
+
'NF' => 'Norfolk Island',
|
182
|
+
'MP' => 'Northern Mariana Islands',
|
183
|
+
'NO' => 'Norway',
|
184
|
+
'OM' => 'Oman',
|
185
|
+
'PK' => 'Pakistan',
|
186
|
+
'PW' => 'Palau',
|
187
|
+
'PS' => 'Palestine, State of',
|
188
|
+
'PA' => 'Panama',
|
189
|
+
'PG' => 'Papua New Guinea',
|
190
|
+
'PY' => 'Paraguay',
|
191
|
+
'PE' => 'Peru',
|
192
|
+
'PH' => 'Philippines',
|
193
|
+
'PN' => 'Pitcairn',
|
194
|
+
'PL' => 'Poland',
|
195
|
+
'PT' => 'Portugal',
|
196
|
+
'PR' => 'Puerto Rico',
|
197
|
+
'QA' => 'Qatar',
|
198
|
+
'RE' => 'Réunion',
|
199
|
+
'RO' => 'Romania',
|
200
|
+
'RU' => 'Russian Federation',
|
201
|
+
'RW' => 'Rwanda',
|
202
|
+
'BL' => 'Saint Barthélemy',
|
203
|
+
'SH' => 'Saint Helena, Ascension and Tristan da Cunha',
|
204
|
+
'KN' => 'Saint Kitts and Nevis',
|
205
|
+
'LC' => 'Saint Lucia',
|
206
|
+
'MF' => 'Saint Martin (French part)',
|
207
|
+
'PM' => 'Saint Pierre and Miquelon',
|
208
|
+
'VC' => 'Saint Vincent and the Grenadines',
|
209
|
+
'WS' => 'Samoa',
|
210
|
+
'SM' => 'San Marino',
|
211
|
+
'ST' => 'Sao Tome and Principe',
|
212
|
+
'SA' => 'Saudi Arabia',
|
213
|
+
'SN' => 'Senegal',
|
214
|
+
'RS' => 'Serbia',
|
215
|
+
'SC' => 'Seychelles',
|
216
|
+
'SL' => 'Sierra Leone',
|
217
|
+
'SG' => 'Singapore',
|
218
|
+
'SX' => 'Sint Maarten (Dutch part)',
|
219
|
+
'SK' => 'Slovakia',
|
220
|
+
'SI' => 'Slovenia',
|
221
|
+
'SB' => 'Solomon Islands',
|
222
|
+
'SO' => 'Somalia',
|
223
|
+
'ZA' => 'South Africa',
|
224
|
+
'GS' => 'South Georgia and the South Sandwich Islands',
|
225
|
+
'SS' => 'South Sudan',
|
226
|
+
'ES' => 'Spain',
|
227
|
+
'LK' => 'Sri Lanka',
|
228
|
+
'SD' => 'Sudan',
|
229
|
+
'SR' => 'Suriname',
|
230
|
+
'SJ' => 'Svalbard and Jan Mayen',
|
231
|
+
'SE' => 'Sweden',
|
232
|
+
'CH' => 'Switzerland',
|
233
|
+
'SY' => 'Syrian Arab Republic',
|
234
|
+
'TW' => 'Taiwan (Province of China)',
|
235
|
+
'TJ' => 'Tajikistan',
|
236
|
+
'TZ' => 'Tanzania, the United Republic of',
|
237
|
+
'TH' => 'Thailand',
|
238
|
+
'TL' => 'Timor-Leste',
|
239
|
+
'TG' => 'Togo',
|
240
|
+
'TK' => 'Tokelau',
|
241
|
+
'TO' => 'Tonga',
|
242
|
+
'TT' => 'Trinidad and Tobago',
|
243
|
+
'TN' => 'Tunisia',
|
244
|
+
'TR' => 'Türkiye',
|
245
|
+
'TM' => 'Turkmenistan',
|
246
|
+
'TC' => 'Turks and Caicos Islands',
|
247
|
+
'TV' => 'Tuvalu',
|
248
|
+
'UG' => 'Uganda',
|
249
|
+
'UA' => 'Ukraine',
|
250
|
+
'AE' => 'United Arab Emirates',
|
251
|
+
'GB' => 'United Kingdom',
|
252
|
+
'US' => 'United States of America',
|
253
|
+
'UM' => 'United States Minor Outlying Islands',
|
254
|
+
'UY' => 'Uruguay',
|
255
|
+
'UZ' => 'Uzbekistan',
|
256
|
+
'VU' => 'Vanuatu',
|
257
|
+
'VE' => 'Venezuela, Bolivarian Republic of',
|
258
|
+
'VN' => 'Viet Nam',
|
259
|
+
'VG' => 'Virgin Islands (British)',
|
260
|
+
'VI' => 'Virgin Islands (U.S.)',
|
261
|
+
'WF' => 'Wallis and Futuna',
|
262
|
+
'EH' => 'Western Sahara',
|
263
|
+
'YE' => 'Yemen',
|
264
|
+
'ZM' => 'Zambia',
|
265
|
+
'ZW' => 'Zimbabwe',
|
266
|
+
'EL' => 'Greece',
|
267
|
+
'XI' => 'United Kingdom (Northern Ireland)',
|
268
|
+
'XU' => 'United Kingdom (excluding Northern Ireland)',
|
269
|
+
'EU' => 'European Union'
|
270
|
+
}.freeze
|
271
|
+
|
272
|
+
def strict_enum?
|
273
|
+
true
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
@@ -61,7 +61,6 @@ module GOBL
|
|
61
61
|
# Village, town, district, or city, typically inside a region.
|
62
62
|
# @return [String]
|
63
63
|
property :locality, String
|
64
|
-
validates_presence_of :locality
|
65
64
|
|
66
65
|
# @!attribute [r] region
|
67
66
|
# Province, county, or state, inside a country.
|
@@ -75,8 +74,8 @@ module GOBL
|
|
75
74
|
|
76
75
|
# @!attribute [r] country
|
77
76
|
# ISO country code.
|
78
|
-
# @return [GOBL::L10n::
|
79
|
-
property :country, GOBL::L10n::
|
77
|
+
# @return [GOBL::L10n::ISOCountryCode]
|
78
|
+
property :country, GOBL::L10n::ISOCountryCode
|
80
79
|
|
81
80
|
# @!attribute [r] coords
|
82
81
|
# When the postal address is not sufficient, coordinates help locate the address more precisely.
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
##
|
7
|
+
|
8
|
+
module GOBL
|
9
|
+
module Org
|
10
|
+
# DocumentRef is used to describe an existing document or a specific part of it's contents.
|
11
|
+
class DocumentRef < GOBL::Object
|
12
|
+
# The Schema ID of the GOBL DocumentRef structure
|
13
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/org/document-ref'
|
14
|
+
|
15
|
+
# @!attribute [r] uuid
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
19
|
+
|
20
|
+
# @!attribute [r] type
|
21
|
+
# Type of the document referenced.
|
22
|
+
# @return [GOBL::CBC::Key]
|
23
|
+
property :type, GOBL::CBC::Key
|
24
|
+
|
25
|
+
# @!attribute [r] issue_date
|
26
|
+
# IssueDate reflects the date the document was issued.
|
27
|
+
# @return [GOBL::Cal::Date]
|
28
|
+
property :issue_date, GOBL::Cal::Date
|
29
|
+
|
30
|
+
# @!attribute [r] series
|
31
|
+
# Series the referenced document belongs to.
|
32
|
+
# @return [GOBL::CBC::Code]
|
33
|
+
property :series, GOBL::CBC::Code
|
34
|
+
|
35
|
+
# @!attribute [r] code
|
36
|
+
# Source document's code or other identifier.
|
37
|
+
# @return [GOBL::CBC::Code]
|
38
|
+
property :code, GOBL::CBC::Code
|
39
|
+
validates_presence_of :code
|
40
|
+
|
41
|
+
# @!attribute [r] line
|
42
|
+
# Line index number inside the document, if relevant.
|
43
|
+
# @return [Integer]
|
44
|
+
property :line, Integer
|
45
|
+
|
46
|
+
# @!attribute [r] identities
|
47
|
+
# List of additional codes, IDs, or SKUs which can be used to identify the document or its contents, agreed upon by the supplier and customer.
|
48
|
+
# @return [Array<GOBL::Org::Identity>]
|
49
|
+
property :identities, [GOBL::Org::Identity]
|
50
|
+
|
51
|
+
# @!attribute [r] period
|
52
|
+
# Tax period in which the referred document had an effect required by some tax regimes and formats.
|
53
|
+
# @return [GOBL::Cal::Period]
|
54
|
+
property :period, GOBL::Cal::Period
|
55
|
+
|
56
|
+
# @!attribute [r] reason
|
57
|
+
# Human readable description on why this reference is here or needs to be used.
|
58
|
+
# @return [String]
|
59
|
+
property :reason, String
|
60
|
+
|
61
|
+
# @!attribute [r] description
|
62
|
+
# Additional details about the document.
|
63
|
+
# @return [String]
|
64
|
+
property :description, String
|
65
|
+
|
66
|
+
# @!attribute [r] stamps
|
67
|
+
# Seals of approval from other organisations that may need to be listed.
|
68
|
+
# @return [Array<GOBL::Head::Stamp>]
|
69
|
+
property :stamps, [GOBL::Head::Stamp]
|
70
|
+
|
71
|
+
# @!attribute [r] url
|
72
|
+
# Link to the source document.
|
73
|
+
# @return [String]
|
74
|
+
property :url, String
|
75
|
+
|
76
|
+
# @!attribute [r] ext
|
77
|
+
# Extensions for additional codes that may be required.
|
78
|
+
# @return [GOBL::Tax::Extensions]
|
79
|
+
property :ext, GOBL::Tax::Extensions
|
80
|
+
|
81
|
+
# @!attribute [r] meta
|
82
|
+
# Meta contains additional information about the document.
|
83
|
+
# @return [GOBL::CBC::Meta]
|
84
|
+
property :meta, GOBL::CBC::Meta
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -22,6 +22,11 @@ module GOBL
|
|
22
22
|
# @return [String]
|
23
23
|
property :label, String
|
24
24
|
|
25
|
+
# @!attribute [r] country
|
26
|
+
# Country from which the identity was issued.
|
27
|
+
# @return [GOBL::L10n::ISOCountryCode]
|
28
|
+
property :country, GOBL::L10n::ISOCountryCode
|
29
|
+
|
25
30
|
# @!attribute [r] key
|
26
31
|
# Uniquely classify this identity using a key instead of a code.
|
27
32
|
# @return [GOBL::CBC::Key]
|
@@ -66,8 +66,8 @@ module GOBL
|
|
66
66
|
|
67
67
|
# @!attribute [r] origin
|
68
68
|
# Country code of where this item was from originally.
|
69
|
-
# @return [GOBL::L10n::
|
70
|
-
property :origin, GOBL::L10n::
|
69
|
+
# @return [GOBL::L10n::ISOCountryCode]
|
70
|
+
property :origin, GOBL::L10n::ISOCountryCode
|
71
71
|
|
72
72
|
# @!attribute [r] ext
|
73
73
|
# Extension code map for any additional regime specific codes that may be required.
|
@@ -31,7 +31,6 @@ module GOBL
|
|
31
31
|
# Person's given or first name
|
32
32
|
# @return [String]
|
33
33
|
property :given, String
|
34
|
-
validates_presence_of :given
|
35
34
|
|
36
35
|
# @!attribute [r] middle
|
37
36
|
# Middle names or initials
|
@@ -42,7 +41,6 @@ module GOBL
|
|
42
41
|
# Second or Family name.
|
43
42
|
# @return [String]
|
44
43
|
property :surname, String
|
45
|
-
validates_presence_of :surname
|
46
44
|
|
47
45
|
# @!attribute [r] surname2
|
48
46
|
# Additional second of family name.
|