gobl 0.24.1 → 0.24.3

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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/data/addons/br-nfe-v4.json +481 -0
  3. data/data/addons/br-nfse-v1.json +235 -0
  4. data/data/addons/co-dian-v2.json +311 -0
  5. data/data/addons/de-xrechnung-v3.json +16 -0
  6. data/data/addons/de-zugferd-v2.json +16 -0
  7. data/data/addons/es-facturae-v3.json +359 -0
  8. data/data/addons/es-tbai-v1.json +225 -0
  9. data/data/addons/es-verifactu-v1.json +609 -0
  10. data/data/addons/eu-en16931-v2017.json +92 -0
  11. data/data/addons/fr-choruspro-v1.json +260 -0
  12. data/data/addons/fr-facturx-v1.json +16 -0
  13. data/data/addons/gr-mydata-v1.json +1495 -0
  14. data/data/addons/it-sdi-v1.json +1570 -0
  15. data/data/addons/it-ticket-v1.json +144 -0
  16. data/data/addons/mx-cfdi-v4.json +908 -0
  17. data/data/addons/pl-favat-v2.json +235 -0
  18. data/data/addons/pt-saft-v1.json +950 -0
  19. data/data/catalogues/cef.json +374 -0
  20. data/data/catalogues/iso.json +19 -0
  21. data/data/catalogues/untdid.json +10669 -0
  22. data/data/currency/iso.json +2378 -0
  23. data/data/currency/non-iso.json +128 -0
  24. data/data/schemas/bill/charge.json +125 -0
  25. data/data/schemas/bill/correction-options.json +54 -0
  26. data/data/schemas/bill/delivery-details.json +41 -0
  27. data/data/schemas/bill/delivery.json +412 -0
  28. data/data/schemas/bill/discount.json +137 -0
  29. data/data/schemas/bill/invoice.json +423 -0
  30. data/data/schemas/bill/line.json +433 -0
  31. data/data/schemas/bill/order.json +401 -0
  32. data/data/schemas/bill/ordering.json +107 -0
  33. data/data/schemas/bill/payment-details.json +36 -0
  34. data/data/schemas/bill/payment.json +424 -0
  35. data/data/schemas/bill/tax.json +45 -0
  36. data/data/schemas/bill/totals.json +84 -0
  37. data/data/schemas/cal/date-time.json +13 -0
  38. data/data/schemas/cal/date.json +13 -0
  39. data/data/schemas/cal/period.json +32 -0
  40. data/data/schemas/cal/time.json +13 -0
  41. data/data/schemas/cbc/code-map.json +16 -0
  42. data/data/schemas/cbc/code.json +15 -0
  43. data/data/schemas/cbc/definition.json +67 -0
  44. data/data/schemas/cbc/key.json +15 -0
  45. data/data/schemas/cbc/meta.json +16 -0
  46. data/data/schemas/cbc/source.json +37 -0
  47. data/data/schemas/currency/amount.json +32 -0
  48. data/data/schemas/currency/code.json +734 -0
  49. data/data/schemas/currency/exchange-rate.json +43 -0
  50. data/data/schemas/dsig/digest.json +27 -0
  51. data/data/schemas/dsig/signature.json +12 -0
  52. data/data/schemas/envelope.json +41 -0
  53. data/data/schemas/head/header.json +62 -0
  54. data/data/schemas/head/link.json +42 -0
  55. data/data/schemas/head/stamp.json +27 -0
  56. data/data/schemas/i18n/string.json +18 -0
  57. data/data/schemas/l10n/code.json +13 -0
  58. data/data/schemas/l10n/iso-country-code.json +1010 -0
  59. data/data/schemas/l10n/tax-country-code.json +1022 -0
  60. data/data/schemas/note/message.json +43 -0
  61. data/data/schemas/num/amount.json +13 -0
  62. data/data/schemas/num/percentage.json +13 -0
  63. data/data/schemas/org/address.json +105 -0
  64. data/data/schemas/org/attachment.json +58 -0
  65. data/data/schemas/org/coordinates.json +33 -0
  66. data/data/schemas/org/document-ref.json +117 -0
  67. data/data/schemas/org/email.json +37 -0
  68. data/data/schemas/org/identity.json +57 -0
  69. data/data/schemas/org/image.json +70 -0
  70. data/data/schemas/org/inbox.json +49 -0
  71. data/data/schemas/org/item.json +96 -0
  72. data/data/schemas/org/name.json +59 -0
  73. data/data/schemas/org/note.json +184 -0
  74. data/data/schemas/org/party.json +129 -0
  75. data/data/schemas/org/person.json +90 -0
  76. data/data/schemas/org/registration.json +66 -0
  77. data/data/schemas/org/telephone.json +32 -0
  78. data/data/schemas/org/unit.json +350 -0
  79. data/data/schemas/org/website.json +38 -0
  80. data/data/schemas/pay/advance.json +211 -0
  81. data/data/schemas/pay/instructions.json +245 -0
  82. data/data/schemas/pay/terms.json +128 -0
  83. data/data/schemas/regimes/mx/food-vouchers.json +111 -0
  84. data/data/schemas/regimes/mx/fuel-account-balance.json +179 -0
  85. data/data/schemas/schema/object.json +12 -0
  86. data/data/schemas/tax/addon-def.json +288 -0
  87. data/data/schemas/tax/catalogue-def.json +37 -0
  88. data/data/schemas/tax/extensions.json +16 -0
  89. data/data/schemas/tax/identity.json +45 -0
  90. data/data/schemas/tax/regime-def.json +513 -0
  91. data/data/schemas/tax/set.json +139 -0
  92. data/data/schemas/tax/total.json +135 -0
  93. data/lib/gobl/extensions/tax/addon_helper.rb +37 -0
  94. data/lib/gobl/version.rb +1 -1
  95. data/lib/gobl.rb +1 -0
  96. metadata +93 -1
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/currency/exchange-rate",
4
+ "$ref": "#/$defs/ExchangeRate",
5
+ "$defs": {
6
+ "ExchangeRate": {
7
+ "properties": {
8
+ "from": {
9
+ "$ref": "https://gobl.org/draft-0/currency/code",
10
+ "title": "From",
11
+ "description": "Currency code this will be converted from."
12
+ },
13
+ "to": {
14
+ "$ref": "https://gobl.org/draft-0/currency/code",
15
+ "title": "To",
16
+ "description": "Currency code this exchange rate will convert into."
17
+ },
18
+ "at": {
19
+ "$ref": "https://gobl.org/draft-0/cal/date-time",
20
+ "title": "At",
21
+ "description": "At represents the effective date and time at which the exchange rate\nis determined by the source. The time may be zero if referring to a\nspecific day only."
22
+ },
23
+ "source": {
24
+ "$ref": "https://gobl.org/draft-0/cbc/key",
25
+ "title": "Source",
26
+ "description": "Source key provides a reference to the source the exchange rate was\nobtained from. Typically this will be determined by an application\nused to update exchange rates automatically."
27
+ },
28
+ "amount": {
29
+ "$ref": "https://gobl.org/draft-0/num/amount",
30
+ "title": "Amount",
31
+ "description": "How much is 1 of the \"from\" currency worth in the \"to\" currency."
32
+ }
33
+ },
34
+ "type": "object",
35
+ "required": [
36
+ "from",
37
+ "to",
38
+ "amount"
39
+ ],
40
+ "description": "ExchangeRate contains data on the rate to be used when converting amounts from one currency into another."
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/dsig/digest",
4
+ "$ref": "#/$defs/Digest",
5
+ "$defs": {
6
+ "Digest": {
7
+ "properties": {
8
+ "alg": {
9
+ "type": "string",
10
+ "title": "Algorithm",
11
+ "description": "Algorithm stores the algorithm key that was used to generate the value."
12
+ },
13
+ "val": {
14
+ "type": "string",
15
+ "title": "Value",
16
+ "description": "Value contains the Hexadecimal representation of the resulting hash\ngenerated by the algorithm."
17
+ }
18
+ },
19
+ "type": "object",
20
+ "required": [
21
+ "alg",
22
+ "val"
23
+ ],
24
+ "description": "Digest defines a structure to hold a digest value including the algorithm used to generate it."
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/dsig/signature",
4
+ "$ref": "#/$defs/Signature",
5
+ "$defs": {
6
+ "Signature": {
7
+ "type": "string",
8
+ "title": "Signature",
9
+ "description": "JSON Web Signature in compact form."
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/envelope",
4
+ "$ref": "#/$defs/Envelope",
5
+ "$defs": {
6
+ "Envelope": {
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "title": "JSON Schema ID",
11
+ "description": "Schema identifies the schema that should be used to understand this document"
12
+ },
13
+ "head": {
14
+ "$ref": "https://gobl.org/draft-0/head/header",
15
+ "title": "Header",
16
+ "description": "Details on what the contents are"
17
+ },
18
+ "doc": {
19
+ "$ref": "https://gobl.org/draft-0/schema/object",
20
+ "title": "Document",
21
+ "description": "The data inside the envelope"
22
+ },
23
+ "sigs": {
24
+ "items": {
25
+ "$ref": "https://gobl.org/draft-0/dsig/signature"
26
+ },
27
+ "type": "array",
28
+ "title": "Signatures",
29
+ "description": "JSON Web Signatures of the header"
30
+ }
31
+ },
32
+ "type": "object",
33
+ "required": [
34
+ "$schema",
35
+ "head",
36
+ "doc"
37
+ ],
38
+ "description": "Envelope wraps around a document adding headers and digital signatures."
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/head/header",
4
+ "$ref": "#/$defs/Header",
5
+ "$defs": {
6
+ "Header": {
7
+ "properties": {
8
+ "uuid": {
9
+ "type": "string",
10
+ "format": "uuid",
11
+ "title": "UUID",
12
+ "description": "Unique UUIDv1 identifier for the envelope."
13
+ },
14
+ "dig": {
15
+ "$ref": "https://gobl.org/draft-0/dsig/digest",
16
+ "title": "Digest",
17
+ "description": "Digest of the canonical JSON body."
18
+ },
19
+ "stamps": {
20
+ "items": {
21
+ "$ref": "https://gobl.org/draft-0/head/stamp"
22
+ },
23
+ "type": "array",
24
+ "title": "Stamps",
25
+ "description": "Seals of approval from other organisations that can only be added to\nnon-draft envelopes."
26
+ },
27
+ "links": {
28
+ "items": {
29
+ "$ref": "https://gobl.org/draft-0/head/link"
30
+ },
31
+ "type": "array",
32
+ "title": "Links",
33
+ "description": "Links provide URLs to other resources that are related to this envelope\nand unlike stamps can be added even in the draft state."
34
+ },
35
+ "tags": {
36
+ "items": {
37
+ "type": "string"
38
+ },
39
+ "type": "array",
40
+ "title": "Tags",
41
+ "description": "Set of labels that describe but have no influence on the data."
42
+ },
43
+ "meta": {
44
+ "$ref": "https://gobl.org/draft-0/cbc/meta",
45
+ "title": "Meta",
46
+ "description": "Additional semi-structured information about this envelope."
47
+ },
48
+ "notes": {
49
+ "type": "string",
50
+ "title": "Notes",
51
+ "description": "Any information that may be relevant to other humans about this envelope"
52
+ }
53
+ },
54
+ "type": "object",
55
+ "required": [
56
+ "uuid",
57
+ "dig"
58
+ ],
59
+ "description": "Header defines the metadata of the body."
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/head/link",
4
+ "$ref": "#/$defs/Link",
5
+ "$defs": {
6
+ "Link": {
7
+ "properties": {
8
+ "key": {
9
+ "$ref": "https://gobl.org/draft-0/cbc/key",
10
+ "description": "Key is a unique identifier for the link."
11
+ },
12
+ "title": {
13
+ "type": "string",
14
+ "title": "Title",
15
+ "description": "Title of the resource to use when presenting to users."
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "title": "Description",
20
+ "description": "Description of the resource to use when presenting to users."
21
+ },
22
+ "mime": {
23
+ "type": "string",
24
+ "title": "MIME Type",
25
+ "description": "Expected MIME type of the link's content."
26
+ },
27
+ "url": {
28
+ "type": "string",
29
+ "format": "uri",
30
+ "title": "URL",
31
+ "description": "URL of the resource."
32
+ }
33
+ },
34
+ "type": "object",
35
+ "required": [
36
+ "key",
37
+ "url"
38
+ ],
39
+ "description": "Link defines a link between this document and another resource."
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/head/stamp",
4
+ "$ref": "#/$defs/Stamp",
5
+ "$defs": {
6
+ "Stamp": {
7
+ "properties": {
8
+ "prv": {
9
+ "$ref": "https://gobl.org/draft-0/cbc/key",
10
+ "title": "Provider",
11
+ "description": "Identity of the agency used to create the stamp usually defined by each region."
12
+ },
13
+ "val": {
14
+ "type": "string",
15
+ "title": "Value",
16
+ "description": "The serialized stamp value generated for or by the external agency"
17
+ }
18
+ },
19
+ "type": "object",
20
+ "required": [
21
+ "prv",
22
+ "val"
23
+ ],
24
+ "description": "Stamp defines an official seal of approval from a third party like a governmental agency or intermediary and should thus be included in any official envelopes."
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/i18n/string",
4
+ "$ref": "#/$defs/String",
5
+ "$defs": {
6
+ "String": {
7
+ "patternProperties": {
8
+ "^[a-z]{2}$": {
9
+ "type": "string",
10
+ "title": "Text in given language."
11
+ }
12
+ },
13
+ "type": "object",
14
+ "title": "Multi-language String",
15
+ "description": "Map of 2-Letter language codes to their translations."
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gobl.org/draft-0/l10n/code",
4
+ "$ref": "#/$defs/Code",
5
+ "$defs": {
6
+ "Code": {
7
+ "type": "string",
8
+ "pattern": "^[A-Z0-9]+$",
9
+ "title": "Code",
10
+ "description": "Code is used for short identifies like country or state codes."
11
+ }
12
+ }
13
+ }