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
@@ -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
|
@@ -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,6 +12,11 @@ module GOBL
|
|
13
12
|
# The Schema ID of the GOBL Message structure
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/note/message'
|
15
14
|
|
15
|
+
# @!attribute [r] uuid
|
16
|
+
# Universally Unique Identifier.
|
17
|
+
# @return [String]
|
18
|
+
property :uuid, String
|
19
|
+
|
16
20
|
# @!attribute [r] title
|
17
21
|
# Summary of the message content
|
18
22
|
# @return [String]
|
@@ -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/address'
|
15
14
|
|
16
15
|
# @!attribute [r] uuid
|
17
|
-
#
|
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
|
# Useful identifier, such as home, work, etc.
|
@@ -62,7 +61,6 @@ module GOBL
|
|
62
61
|
# Village, town, district, or city, typically inside a region.
|
63
62
|
# @return [String]
|
64
63
|
property :locality, String
|
65
|
-
validates_presence_of :locality
|
66
64
|
|
67
65
|
# @!attribute [r] region
|
68
66
|
# Province, county, or state, inside a country.
|
@@ -76,8 +74,8 @@ module GOBL
|
|
76
74
|
|
77
75
|
# @!attribute [r] country
|
78
76
|
# ISO country code.
|
79
|
-
# @return [GOBL::L10n::
|
80
|
-
property :country, GOBL::L10n::
|
77
|
+
# @return [GOBL::L10n::ISOCountryCode]
|
78
|
+
property :country, GOBL::L10n::ISOCountryCode
|
81
79
|
|
82
80
|
# @!attribute [r] coords
|
83
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
|
@@ -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/email'
|
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 the email.
|
@@ -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,15 +13,20 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/identity'
|
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
|
# Optional label useful for non-standard identities to give a bit more context.
|
23
22
|
# @return [String]
|
24
23
|
property :label, String
|
25
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
|
+
|
26
30
|
# @!attribute [r] key
|
27
31
|
# Uniquely classify this identity using a key instead of a code.
|
28
32
|
# @return [GOBL::CBC::Key]
|
@@ -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/image'
|
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 to help identify the image.
|
@@ -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/inbox'
|
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] key
|
22
21
|
# Type of inbox being defined.
|
@@ -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/item'
|
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] ref
|
22
21
|
# Primary reference code that identifies this item. Additional codes can be provided in the 'identities' property.
|
@@ -55,6 +54,11 @@ module GOBL
|
|
55
54
|
property :price, GOBL::Num::Amount
|
56
55
|
validates_presence_of :price
|
57
56
|
|
57
|
+
# @!attribute [r] alt_prices
|
58
|
+
# AltPrices defines a list of prices with their currencies that may be used as an alternative to the item's base price.
|
59
|
+
# @return [Array<GOBL::Currency::Amount>]
|
60
|
+
property :alt_prices, [GOBL::Currency::Amount]
|
61
|
+
|
58
62
|
# @!attribute [r] unit
|
59
63
|
# Unit of measure.
|
60
64
|
# @return [GOBL::Org::Unit]
|
@@ -62,8 +66,8 @@ module GOBL
|
|
62
66
|
|
63
67
|
# @!attribute [r] origin
|
64
68
|
# Country code of where this item was from originally.
|
65
|
-
# @return [GOBL::L10n::
|
66
|
-
property :origin, GOBL::L10n::
|
69
|
+
# @return [GOBL::L10n::ISOCountryCode]
|
70
|
+
property :origin, GOBL::L10n::ISOCountryCode
|
67
71
|
|
68
72
|
# @!attribute [r] ext
|
69
73
|
# Extension code map for any additional regime specific codes that may be required.
|
@@ -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/name'
|
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] alias
|
22
21
|
# What the person would like to be called
|
@@ -32,7 +31,6 @@ module GOBL
|
|
32
31
|
# Person's given or first name
|
33
32
|
# @return [String]
|
34
33
|
property :given, String
|
35
|
-
validates_presence_of :given
|
36
34
|
|
37
35
|
# @!attribute [r] middle
|
38
36
|
# Middle names or initials
|
@@ -43,7 +41,6 @@ module GOBL
|
|
43
41
|
# Second or Family name.
|
44
42
|
# @return [String]
|
45
43
|
property :surname, String
|
46
|
-
validates_presence_of :surname
|
47
44
|
|
48
45
|
# @!attribute [r] surname2
|
49
46
|
# Additional second of family name.
|
@@ -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,15 +13,19 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/party'
|
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
|
19
|
+
|
20
|
+
# @!attribute [r] label
|
21
|
+
# Label can be used to provide a custom label for the party in a given context in a single language, for example "Supplier", "Host", or similar.
|
22
|
+
# @return [String]
|
23
|
+
property :label, String
|
20
24
|
|
21
25
|
# @!attribute [r] name
|
22
26
|
# Legal name or representation of the organization.
|
23
27
|
# @return [String]
|
24
28
|
property :name, String
|
25
|
-
validates_presence_of :name
|
26
29
|
|
27
30
|
# @!attribute [r] alias
|
28
31
|
# Alternate short name.
|
@@ -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,14 @@ module GOBL
|
|
14
13
|
SCHEMA_ID = 'https://gobl.org/draft-0/org/person'
|
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
|
19
|
+
|
20
|
+
# @!attribute [r] label
|
21
|
+
# Label can be used to identify the person in a given context in a single language, for example "Attn", "Contact", "Responsible", etc.
|
22
|
+
# @return [String]
|
23
|
+
property :label, String
|
20
24
|
|
21
25
|
# @!attribute [r] name
|
22
26
|
# Complete details on the name of the person
|