gobl 0.20.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/data/regimes/at.json +160 -0
  4. data/data/regimes/be.json +169 -0
  5. data/data/regimes/ca.json +10 -1
  6. data/data/regimes/ch.json +158 -0
  7. data/data/regimes/co.json +179 -169
  8. data/data/regimes/de.json +63 -49
  9. data/data/regimes/el.json +204 -0
  10. data/data/regimes/es.json +84 -557
  11. data/data/regimes/fr.json +57 -52
  12. data/data/regimes/gb.json +67 -50
  13. data/data/regimes/gr.json +591 -0
  14. data/data/regimes/it.json +62 -1298
  15. data/data/regimes/mx.json +38 -627
  16. data/data/regimes/nl.json +63 -50
  17. data/data/regimes/pl.json +161 -101
  18. data/data/regimes/pt.json +44 -365
  19. data/data/regimes/us.json +63 -49
  20. data/lib/generated/gobl/bill/charge.rb +6 -7
  21. data/lib/generated/gobl/bill/correction_options.rb +5 -1
  22. data/lib/generated/gobl/bill/delivery.rb +0 -1
  23. data/lib/generated/gobl/bill/discount.rb +5 -6
  24. data/lib/generated/gobl/bill/invoice.rb +51 -12
  25. data/lib/generated/gobl/bill/line.rb +3 -4
  26. data/lib/generated/gobl/bill/line_charge.rb +0 -1
  27. data/lib/generated/gobl/bill/line_discount.rb +0 -1
  28. data/lib/generated/gobl/bill/ordering.rb +34 -35
  29. data/lib/generated/gobl/bill/outlay.rb +3 -4
  30. data/lib/generated/gobl/bill/payment.rb +0 -1
  31. data/lib/generated/gobl/bill/tax.rb +4 -5
  32. data/lib/generated/gobl/bill/totals.rb +0 -1
  33. data/lib/generated/gobl/cal/date.rb +0 -1
  34. data/lib/generated/gobl/cal/date_time.rb +0 -1
  35. data/lib/generated/gobl/cal/period.rb +0 -1
  36. data/lib/generated/gobl/cbc/code.rb +0 -1
  37. data/lib/generated/gobl/cbc/code_map.rb +0 -1
  38. data/lib/generated/gobl/cbc/key.rb +0 -1
  39. data/lib/generated/gobl/cbc/key_definition.rb +4 -10
  40. data/lib/generated/gobl/cbc/meta.rb +0 -1
  41. data/lib/generated/gobl/cbc/note.rb +0 -1
  42. data/lib/generated/gobl/cbc/value_definition.rb +37 -0
  43. data/lib/generated/gobl/currency/amount.rb +33 -0
  44. data/lib/generated/gobl/currency/code.rb +118 -105
  45. data/lib/generated/gobl/currency/exchange_rate.rb +17 -7
  46. data/lib/generated/gobl/dsig/digest.rb +0 -1
  47. data/lib/generated/gobl/dsig/signature.rb +0 -1
  48. data/lib/generated/gobl/envelope.rb +0 -1
  49. data/lib/generated/gobl/head/header.rb +7 -8
  50. data/lib/generated/gobl/head/link.rb +43 -0
  51. data/lib/generated/gobl/head/stamp.rb +0 -1
  52. data/lib/generated/gobl/i18n/string.rb +0 -1
  53. data/lib/generated/gobl/l10n/code.rb +0 -1
  54. data/lib/generated/gobl/l10n/{country_code.rb → iso_country_code.rb} +3 -4
  55. data/lib/generated/gobl/l10n/tax_country_code.rb +277 -0
  56. data/lib/generated/gobl/note/message.rb +5 -1
  57. data/lib/generated/gobl/org/address.rb +5 -7
  58. data/lib/generated/gobl/org/coordinates.rb +0 -1
  59. data/lib/generated/gobl/org/document_ref.rb +87 -0
  60. data/lib/generated/gobl/org/email.rb +3 -4
  61. data/lib/generated/gobl/org/identity.rb +8 -4
  62. data/lib/generated/gobl/org/image.rb +3 -4
  63. data/lib/generated/gobl/org/inbox.rb +3 -4
  64. data/lib/generated/gobl/org/item.rb +10 -6
  65. data/lib/generated/gobl/org/name.rb +3 -6
  66. data/lib/generated/gobl/org/party.rb +8 -5
  67. data/lib/generated/gobl/org/person.rb +8 -4
  68. data/lib/generated/gobl/org/registration.rb +11 -3
  69. data/lib/generated/gobl/org/telephone.rb +3 -4
  70. data/lib/generated/gobl/org/unit.rb +0 -1
  71. data/lib/generated/gobl/org/website.rb +4 -5
  72. data/lib/generated/gobl/pay/advance.rb +8 -4
  73. data/lib/generated/gobl/pay/card.rb +0 -1
  74. data/lib/generated/gobl/pay/credit_transfer.rb +0 -1
  75. data/lib/generated/gobl/pay/direct_debit.rb +0 -1
  76. data/lib/generated/gobl/pay/due_date.rb +0 -1
  77. data/lib/generated/gobl/pay/instructions.rb +5 -1
  78. data/lib/generated/gobl/pay/online.rb +12 -8
  79. data/lib/generated/gobl/pay/terms.rb +0 -1
  80. data/lib/generated/gobl/regimes/mx/food_vouchers.rb +0 -1
  81. data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +0 -1
  82. data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +0 -1
  83. data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +0 -1
  84. data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +0 -1
  85. data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +0 -2
  86. data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +11 -9
  87. data/lib/generated/gobl/schema/object.rb +0 -1
  88. data/lib/generated/gobl/tax/addon_def.rb +61 -0
  89. data/lib/generated/gobl/tax/{category.rb → category_def.rb} +11 -12
  90. data/lib/generated/gobl/tax/category_total.rb +0 -1
  91. data/lib/generated/gobl/tax/combo.rb +6 -2
  92. data/lib/generated/gobl/tax/correction_definition.rb +1 -2
  93. data/lib/generated/gobl/tax/correction_set.rb +13 -0
  94. data/lib/generated/gobl/tax/extensions.rb +0 -1
  95. data/lib/generated/gobl/tax/identity.rb +13 -19
  96. data/lib/generated/gobl/tax/{rate.rb → rate_def.rb} +11 -17
  97. data/lib/generated/gobl/tax/rate_total.rb +6 -2
  98. data/lib/generated/gobl/tax/rate_total_surcharge.rb +0 -1
  99. data/lib/generated/gobl/tax/{rate_value.rb → rate_value_def.rb} +9 -5
  100. data/lib/generated/gobl/tax/{regime.rb → regime_def.rb} +38 -24
  101. data/lib/generated/gobl/tax/scenario.rb +20 -11
  102. data/lib/generated/gobl/tax/scenario_set.rb +1 -2
  103. data/lib/generated/gobl/tax/set.rb +0 -1
  104. data/lib/generated/gobl/tax/source.rb +1 -2
  105. data/lib/generated/gobl/tax/tag_set.rb +28 -0
  106. data/lib/generated/gobl/tax/total.rb +0 -1
  107. data/lib/gobl/extensions/bill/invoice_helper.rb +6 -36
  108. data/lib/gobl/extensions/envelope_helper.rb +4 -0
  109. data/lib/gobl/version.rb +1 -1
  110. data/lib/gobl.rb +3 -2
  111. metadata +20 -12
  112. data/lib/generated/gobl/bill/document_reference.rb +0 -37
  113. data/lib/generated/gobl/bill/preceding.rb +0 -79
  114. data/lib/generated/gobl/cbc/code_definition.rb +0 -38
  115. data/lib/generated/gobl/uuid/uuid.rb +0 -17
  116. data/lib/gobl/extensions/bill/scenario_summary.rb +0 -25
@@ -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
@@ -24,6 +23,11 @@ module GOBL
24
23
  # @return [GOBL::Cal::Date]
25
24
  property :issue_date, GOBL::Cal::Date
26
25
 
26
+ # @!attribute [r] series
27
+ # Series to assign to the new corrective invoice.
28
+ # @return [GOBL::CBC::Code]
29
+ property :series, GOBL::CBC::Code
30
+
27
31
  # @!attribute [r] stamps
28
32
  # Stamps of the previous document to include in the preceding data.
29
33
  # @return [Array<GOBL::Head::Stamp>]
@@ -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
@@ -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/bill/invoice#/$defs/Discount'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identifying for the discount entry
18
- # @return [GOBL::UUID::UUID]
19
- property :uuid, GOBL::UUID::UUID
16
+ # Universally Unique Identifier.
17
+ # @return [String]
18
+ property :uuid, String
20
19
 
21
20
  # @!attribute [r] i
22
21
  # Line number inside the list of discounts (calculated)
@@ -29,12 +28,12 @@ module GOBL
29
28
  property :ref, String
30
29
 
31
30
  # @!attribute [r] base
32
- # Base represents the value used as a base for percent calculations. If not already provided, we'll take the invoices sum.
31
+ # Base represents the value used as a base for percent calculations instead of the invoice's sum of lines.
33
32
  # @return [GOBL::Num::Amount]
34
33
  property :base, GOBL::Num::Amount
35
34
 
36
35
  # @!attribute [r] percent
37
- # Percentage to apply to the invoice's Sum.
36
+ # Percentage to apply to the base or invoice's sum.
38
37
  # @return [GOBL::Num::Percentage]
39
38
  property :percent, GOBL::Num::Percentage
40
39
 
@@ -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,10 +12,45 @@ module GOBL
13
12
  # The Schema ID of the GOBL Invoice structure
14
13
  SCHEMA_ID = 'https://gobl.org/draft-0/bill/invoice'
15
14
 
15
+ # Enumeration of possible values for {#$regime} with their corresponding descriptions
16
+ $REGIME_ENUM = {
17
+ 'AT' => 'Austria',
18
+ 'BE' => 'Belgium',
19
+ 'CA' => 'Canada',
20
+ 'CH' => 'Switzerland',
21
+ 'CO' => 'Colombia',
22
+ 'DE' => 'Germany',
23
+ 'EL' => 'Greece',
24
+ 'ES' => 'Spain',
25
+ 'FR' => 'France',
26
+ 'GB' => 'United Kingdom',
27
+ 'IT' => 'Italy',
28
+ 'MX' => 'Mexico',
29
+ 'NL' => 'The Netherlands',
30
+ 'PL' => 'Poland',
31
+ 'PT' => 'Portugal',
32
+ 'US' => 'United States of America'
33
+ }.freeze
34
+
35
+ # @!attribute [r] $regime
36
+ # @return [GOBL::L10n::TaxCountryCode]
37
+ property :$regime, GOBL::L10n::TaxCountryCode
38
+ validates_inclusion_of :$regime, in: $REGIME_ENUM.keys, allow_blank: true
39
+
40
+ # @!attribute [r] $addons
41
+ # Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
42
+ # @return [Array<GOBL::CBC::Key>]
43
+ property :$addons, [GOBL::CBC::Key]
44
+
45
+ # @!attribute [r] $tags
46
+ # Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags.
47
+ # @return [Array<GOBL::CBC::Key>]
48
+ property :$tags, [GOBL::CBC::Key]
49
+
16
50
  # @!attribute [r] uuid
17
- # Unique document ID. Not required, but always recommended in addition to the Code.
18
- # @return [GOBL::UUID::UUID]
19
- property :uuid, GOBL::UUID::UUID
51
+ # Universally Unique Identifier.
52
+ # @return [String]
53
+ property :uuid, String
20
54
 
21
55
  # Enumeration of possible values for {#type} with their corresponding descriptions
22
56
  TYPE_ENUM = {
@@ -25,7 +59,12 @@ module GOBL
25
59
  'corrective' => 'Corrected invoice that completely *replaces* the preceding document.',
26
60
  'credit-note' => 'Reflects a refund either partial or complete of the preceding document. A
27
61
  credit note effectively *extends* the previous document.',
28
- 'debit-note' => 'An additional set of charges to be added to the preceding document.'
62
+ 'debit-note' => 'An additional set of charges to be added to the preceding document.',
63
+ 'other' => 'Any other type of invoice that does not fit into the standard categories and implies
64
+ that any scenarios defined in tax regimes or addons will not be applied.
65
+
66
+ This is useful for being able to create invoices with custom types in extensions,
67
+ but is not recommend for general use.'
29
68
  }.freeze
30
69
 
31
70
  # @!attribute [r] type
@@ -36,13 +75,13 @@ module GOBL
36
75
 
37
76
  # @!attribute [r] series
38
77
  # Used as a prefix to group codes.
39
- # @return [String]
40
- property :series, String
78
+ # @return [GOBL::CBC::Code]
79
+ property :series, GOBL::CBC::Code
41
80
 
42
81
  # @!attribute [r] code
43
82
  # Sequential code used to identify this invoice in tax declarations.
44
- # @return [String]
45
- property :code, String
83
+ # @return [GOBL::CBC::Code]
84
+ property :code, GOBL::CBC::Code
46
85
  validates_presence_of :code
47
86
 
48
87
  # @!attribute [r] issue_date
@@ -72,8 +111,8 @@ module GOBL
72
111
 
73
112
  # @!attribute [r] preceding
74
113
  # Key information regarding previous invoices and potentially details as to why they were corrected.
75
- # @return [Array<Preceding>]
76
- property :preceding, [Preceding]
114
+ # @return [Array<GOBL::Org::DocumentRef>]
115
+ property :preceding, [GOBL::Org::DocumentRef]
77
116
 
78
117
  # @!attribute [r] tax
79
118
  # Special tax configuration for billing.
@@ -87,7 +126,7 @@ module GOBL
87
126
  validates_presence_of :supplier
88
127
 
89
128
  # @!attribute [r] customer
90
- # Legal entity receiving the goods or services, may be empty in certain circumstances such as simplified invoices.
129
+ # Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
91
130
  # @return [GOBL::Org::Party]
92
131
  property :customer, GOBL::Org::Party
93
132
 
@@ -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/bill/invoice#/$defs/Line'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identifier for this line
18
- # @return [GOBL::UUID::UUID]
19
- property :uuid, GOBL::UUID::UUID
16
+ # Universally Unique Identifier.
17
+ # @return [String]
18
+ property :uuid, String
20
19
 
21
20
  # @!attribute [r] i
22
21
  # Line number inside the parent (calculated)
@@ -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
@@ -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
@@ -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
@@ -15,8 +14,8 @@ module GOBL
15
14
 
16
15
  # @!attribute [r] code
17
16
  # Identifier assigned by the customer or buyer for internal routing purposes.
18
- # @return [String]
19
- property :code, String
17
+ # @return [GOBL::CBC::Code]
18
+ property :code, GOBL::CBC::Code
20
19
 
21
20
  # @!attribute [r] identities
22
21
  # Any additional Codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
@@ -28,50 +27,50 @@ module GOBL
28
27
  # @return [GOBL::Cal::Period]
29
28
  property :period, GOBL::Cal::Period
30
29
 
31
- # @!attribute [r] project
32
- # Project this invoice refers to.
33
- # @return [DocumentReference]
34
- property :project, DocumentReference
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]
35
44
 
36
- # @!attribute [r] contract
37
- # The identification of a contract.
38
- # @return [DocumentReference]
39
- property :contract, DocumentReference
45
+ # @!attribute [r] contracts
46
+ # The identification of contracts.
47
+ # @return [Array<GOBL::Org::DocumentRef>]
48
+ property :contracts, [GOBL::Org::DocumentRef]
40
49
 
41
- # @!attribute [r] purchase
42
- # Purchase order issued by the customer or buyer.
43
- # @return [DocumentReference]
44
- property :purchase, DocumentReference
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]
45
54
 
46
- # @!attribute [r] sale
47
- # Sales order issued by the supplier or seller.
48
- # @return [DocumentReference]
49
- property :sale, DocumentReference
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]
50
59
 
51
60
  # @!attribute [r] receiving
52
61
  # Receiving Advice.
53
- # @return [DocumentReference]
54
- property :receiving, DocumentReference
62
+ # @return [Array<GOBL::Org::DocumentRef>]
63
+ property :receiving, [GOBL::Org::DocumentRef]
55
64
 
56
65
  # @!attribute [r] despatch
57
66
  # Despatch advice.
58
- # @return [DocumentReference]
59
- property :despatch, DocumentReference
67
+ # @return [Array<GOBL::Org::DocumentRef>]
68
+ property :despatch, [GOBL::Org::DocumentRef]
60
69
 
61
70
  # @!attribute [r] tender
62
71
  # Tender advice, the identification of the call for tender or lot the invoice relates to.
63
- # @return [DocumentReference]
64
- property :tender, DocumentReference
65
-
66
- # @!attribute [r] buyer
67
- # Party who is responsible for making the purchase, but is not responsible for handling taxes.
68
- # @return [GOBL::Org::Party]
69
- property :buyer, GOBL::Org::Party
70
-
71
- # @!attribute [r] seller
72
- # Party who is selling the goods but is not responsible for taxes like the supplier.
73
- # @return [GOBL::Org::Party]
74
- property :seller, GOBL::Org::Party
72
+ # @return [Array<GOBL::Org::DocumentRef>]
73
+ property :tender, [GOBL::Org::DocumentRef]
75
74
  end
76
75
  end
77
76
  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/bill/invoice#/$defs/Outlay'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identity for this outlay.
18
- # @return [GOBL::UUID::UUID]
19
- property :uuid, GOBL::UUID::UUID
16
+ # Universally Unique Identifier.
17
+ # @return [String]
18
+ property :uuid, String
20
19
 
21
20
  # @!attribute [r] i
22
21
  # Outlay number index inside the invoice for ordering (calculated).
@@ -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
@@ -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
@@ -18,10 +17,10 @@ module GOBL
18
17
  # @return [GOBL::CBC::Code]
19
18
  property :prices_include, GOBL::CBC::Code
20
19
 
21
- # @!attribute [r] tags
22
- # Special tax tags that apply to this invoice according to local requirements.
23
- # @return [Array<GOBL::CBC::Key>]
24
- property :tags, [GOBL::CBC::Key]
20
+ # @!attribute [r] ext
21
+ # Additional extensions that are applied to the invoice as a whole as opposed to specific sections.
22
+ # @return [GOBL::Tax::Extensions]
23
+ property :ext, GOBL::Tax::Extensions
25
24
 
26
25
  # @!attribute [r] meta
27
26
  # Any additional data that may be required for processing, but should never be relied upon by recipients.
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -35,15 +34,10 @@ module GOBL
35
34
  # @return [GOBL::CBC::Meta]
36
35
  property :meta, GOBL::CBC::Meta
37
36
 
38
- # @!attribute [r] codes
39
- # Codes describes the list of codes that can be used alongside the Key, for example with identities.
40
- # @return [Array<GOBL::CBC::CodeDefinition>]
41
- property :codes, [GOBL::CBC::CodeDefinition]
42
-
43
- # @!attribute [r] keys
44
- # Keys is used instead of codes to define a further sub-set of keys that can be used alongside this one.
45
- # @return [Array<GOBL::CBC::KeyDefinition>]
46
- 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]
47
41
 
48
42
  # @!attribute [r] pattern
49
43
  # Pattern is used to validate the key value instead of using a fixed value from the code or key definitions.
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ##
7
+
8
+ module GOBL
9
+ module Currency
10
+ # An Amount represents a monetary value in a specific currency.
11
+ class Amount < GOBL::Object
12
+ # The Schema ID of the GOBL Amount structure
13
+ SCHEMA_ID = 'https://gobl.org/draft-0/currency/amount'
14
+
15
+ # @!attribute [r] label
16
+ # Label allows for additional information to be added to the currency Amount that may be useful.
17
+ # @return [String]
18
+ property :label, String
19
+
20
+ # @!attribute [r] currency
21
+ # Code defines the currency for this amount.
22
+ # @return [GOBL::Currency::Code]
23
+ property :currency, GOBL::Currency::Code
24
+ validates_presence_of :currency
25
+
26
+ # @!attribute [r] value
27
+ # Value is the amount in the currency.
28
+ # @return [GOBL::Num::Amount]
29
+ property :value, GOBL::Num::Amount
30
+ validates_presence_of :value
31
+ end
32
+ end
33
+ end