gobl 0.17.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/data/regimes/ca.json +77 -0
  4. data/data/regimes/co.json +2850 -2777
  5. data/data/regimes/de.json +182 -0
  6. data/data/regimes/es.json +1241 -1218
  7. data/data/regimes/fr.json +125 -10
  8. data/data/regimes/gb.json +71 -1
  9. data/data/regimes/it.json +1772 -1701
  10. data/data/regimes/mx.json +128 -10
  11. data/data/regimes/nl.json +71 -1
  12. data/data/regimes/pl.json +398 -0
  13. data/data/regimes/pt.json +245 -185
  14. data/data/regimes/us.json +55 -2
  15. data/lib/generated/gobl/bill/charge.rb +1 -1
  16. data/lib/generated/gobl/bill/correction_options.rb +11 -20
  17. data/lib/generated/gobl/bill/delivery.rb +6 -1
  18. data/lib/generated/gobl/bill/discount.rb +1 -1
  19. data/lib/generated/gobl/bill/document_reference.rb +1 -1
  20. data/lib/generated/gobl/bill/invoice.rb +1 -1
  21. data/lib/generated/gobl/bill/line.rb +1 -1
  22. data/lib/generated/gobl/bill/line_charge.rb +1 -1
  23. data/lib/generated/gobl/bill/line_discount.rb +1 -1
  24. data/lib/generated/gobl/bill/ordering.rb +6 -1
  25. data/lib/generated/gobl/bill/outlay.rb +4 -4
  26. data/lib/generated/gobl/bill/payment.rb +1 -1
  27. data/lib/generated/gobl/bill/preceding.rb +11 -11
  28. data/lib/generated/gobl/bill/tax.rb +1 -1
  29. data/lib/generated/gobl/bill/totals.rb +6 -1
  30. data/lib/generated/gobl/cal/date.rb +1 -1
  31. data/lib/generated/gobl/cal/date_time.rb +1 -1
  32. data/lib/generated/gobl/cal/period.rb +1 -1
  33. data/lib/generated/gobl/cbc/code.rb +1 -1
  34. data/lib/generated/gobl/cbc/code_map.rb +1 -1
  35. data/lib/generated/gobl/cbc/key.rb +1 -1
  36. data/lib/generated/gobl/cbc/meta.rb +1 -1
  37. data/lib/generated/gobl/cbc/note.rb +1 -1
  38. data/lib/generated/gobl/currency/code.rb +1 -1
  39. data/lib/generated/gobl/currency/exchange_rate.rb +1 -1
  40. data/lib/generated/gobl/dsig/digest.rb +1 -1
  41. data/lib/generated/gobl/dsig/signature.rb +1 -1
  42. data/lib/generated/gobl/envelope.rb +1 -1
  43. data/lib/generated/gobl/head/header.rb +1 -1
  44. data/lib/generated/gobl/head/stamp.rb +1 -1
  45. data/lib/generated/gobl/i18n/string.rb +1 -1
  46. data/lib/generated/gobl/l10n/code.rb +1 -1
  47. data/lib/generated/gobl/l10n/country_code.rb +1 -1
  48. data/lib/generated/gobl/note/message.rb +1 -1
  49. data/lib/generated/gobl/org/address.rb +1 -1
  50. data/lib/generated/gobl/org/coordinates.rb +1 -1
  51. data/lib/generated/gobl/org/email.rb +1 -1
  52. data/lib/generated/gobl/org/identity.rb +6 -1
  53. data/lib/generated/gobl/org/image.rb +6 -1
  54. data/lib/generated/gobl/org/inbox.rb +1 -1
  55. data/lib/generated/gobl/org/item.rb +6 -6
  56. data/lib/generated/gobl/org/name.rb +1 -1
  57. data/lib/generated/gobl/org/party.rb +3 -3
  58. data/lib/generated/gobl/org/person.rb +1 -1
  59. data/lib/generated/gobl/org/registration.rb +1 -1
  60. data/lib/generated/gobl/org/telephone.rb +1 -1
  61. data/lib/generated/gobl/org/unit.rb +26 -10
  62. data/lib/generated/gobl/org/website.rb +1 -1
  63. data/lib/generated/gobl/pay/advance.rb +19 -4
  64. data/lib/generated/gobl/pay/card.rb +1 -1
  65. data/lib/generated/gobl/pay/credit_transfer.rb +1 -1
  66. data/lib/generated/gobl/pay/direct_debit.rb +1 -1
  67. data/lib/generated/gobl/pay/due_date.rb +1 -1
  68. data/lib/generated/gobl/pay/instructions.rb +1 -1
  69. data/lib/generated/gobl/pay/online.rb +1 -1
  70. data/lib/generated/gobl/pay/terms.rb +1 -1
  71. data/lib/generated/gobl/regimes/mx/food_vouchers.rb +41 -0
  72. data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +42 -0
  73. data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +42 -0
  74. data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +41 -0
  75. data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +42 -0
  76. data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +73 -0
  77. data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +37 -0
  78. data/lib/generated/gobl/schema/object.rb +1 -1
  79. data/lib/generated/gobl/tax/category.rb +11 -3
  80. data/lib/generated/gobl/tax/category_total.rb +1 -1
  81. data/lib/generated/gobl/tax/code_definition.rb +1 -1
  82. data/lib/generated/gobl/tax/combo.rb +3 -3
  83. data/lib/generated/gobl/tax/correction_definition.rb +43 -0
  84. data/lib/generated/gobl/tax/ext_map.rb +15 -0
  85. data/lib/generated/gobl/tax/identity.rb +1 -1
  86. data/lib/generated/gobl/tax/key_definition.rb +8 -2
  87. data/lib/generated/gobl/tax/rate.rb +1 -1
  88. data/lib/generated/gobl/tax/rate_total.rb +3 -3
  89. data/lib/generated/gobl/tax/rate_total_surcharge.rb +1 -1
  90. data/lib/generated/gobl/tax/rate_value.rb +1 -1
  91. data/lib/generated/gobl/tax/regime.rb +18 -14
  92. data/lib/generated/gobl/tax/scenario.rb +1 -1
  93. data/lib/generated/gobl/tax/scenario_set.rb +1 -1
  94. data/lib/generated/gobl/tax/set.rb +1 -1
  95. data/lib/generated/gobl/tax/source.rb +1 -1
  96. data/lib/generated/gobl/tax/total.rb +1 -1
  97. data/lib/generated/gobl/tax/zone.rb +1 -1
  98. data/lib/generated/gobl/uuid/uuid.rb +1 -1
  99. data/lib/gobl/version.rb +1 -1
  100. metadata +15 -4
  101. data/lib/generated/gobl/tax/preceding_definitions.rb +0 -37
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FoodVouchers carries the data to produce a CFDI's "Complemento de Vales de Despensa" (version 1.0) providing detailed information about food vouchers issued by an e-wallet supplier to its customer's employees.
13
+ class FoodVouchers < GOBL::Object
14
+ # The Schema ID of the GOBL FoodVouchers structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/food-vouchers'
16
+
17
+ # @!attribute [r] employer_registration
18
+ # Customer's employer registration number (maps to `registroPatronal`).
19
+ # @return [String]
20
+ property :employer_registration, String
21
+
22
+ # @!attribute [r] account_number
23
+ # Customer's account number (maps to `numeroDeCuenta`).
24
+ # @return [String]
25
+ property :account_number, String
26
+ validates_presence_of :account_number
27
+
28
+ # @!attribute [r] total
29
+ # Sum of all line amounts (calculated, maps to `total`).
30
+ # @return [GOBL::Num::Amount]
31
+ property :total, GOBL::Num::Amount
32
+
33
+ # @!attribute [r] lines
34
+ # List of food vouchers issued to the customer's employees (maps to `Conceptos`).
35
+ # @return [Array<FoodVouchersLine>]
36
+ property :lines, [FoodVouchersLine]
37
+ validates_presence_of :lines
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FoodVouchersEmployee represents an employee that received a food voucher.
13
+ class FoodVouchersEmployee < GOBL::Object
14
+ # The Schema ID of the GOBL FoodVouchersEmployee structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/food-vouchers#/$defs/FoodVouchersEmployee'
16
+
17
+ # @!attribute [r] tax_code
18
+ # Employee's tax identity code (maps to `rfc`).
19
+ # @return [GOBL::CBC::Code]
20
+ property :tax_code, GOBL::CBC::Code
21
+ validates_presence_of :tax_code
22
+
23
+ # @!attribute [r] curp
24
+ # Employee's CURP ("Clave Única de Registro de Población", maps to `curp`).
25
+ # @return [GOBL::CBC::Code]
26
+ property :curp, GOBL::CBC::Code
27
+ validates_presence_of :curp
28
+
29
+ # @!attribute [r] name
30
+ # Employee's name (maps to `nombre`).
31
+ # @return [String]
32
+ property :name, String
33
+ validates_presence_of :name
34
+
35
+ # @!attribute [r] social_security
36
+ # Employee's Social Security Number (maps to `numSeguridadSocial`).
37
+ # @return [GOBL::CBC::Code]
38
+ property :social_security, GOBL::CBC::Code
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FoodVouchersLine represents a single food voucher issued to the e-wallet of one of the customer's employees.
13
+ class FoodVouchersLine < GOBL::Object
14
+ # The Schema ID of the GOBL FoodVouchersLine structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/food-vouchers#/$defs/FoodVouchersLine'
16
+
17
+ # @!attribute [r] e_wallet_id
18
+ # Identifier of the e-wallet that received the food voucher (maps to `Identificador`).
19
+ # @return [GOBL::CBC::Code]
20
+ property :e_wallet_id, GOBL::CBC::Code
21
+ validates_presence_of :e_wallet_id
22
+
23
+ # @!attribute [r] issue_date_time
24
+ # Date and time of the food voucher's issue (maps to `Fecha`).
25
+ # @return [GOBL::Cal::DateTime]
26
+ property :issue_date_time, GOBL::Cal::DateTime
27
+ validates_presence_of :issue_date_time
28
+
29
+ # @!attribute [r] employee
30
+ # Employee that received the food voucher.
31
+ # @return [FoodVouchersEmployee]
32
+ property :employee, FoodVouchersEmployee
33
+
34
+ # @!attribute [r] amount
35
+ # Amount of the food voucher (maps to `importe`).
36
+ # @return [GOBL::Num::Amount]
37
+ property :amount, GOBL::Num::Amount
38
+ validates_presence_of :amount
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FuelAccountBalance carries the data to produce a CFDI's "Complemento de Estado de Cuenta de Combustibles para Monederos Electrónicos" (version 1.2 revision B) providing detailed information about fuel purchases made with electronic wallets.
13
+ class FuelAccountBalance < GOBL::Object
14
+ # The Schema ID of the GOBL FuelAccountBalance structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance'
16
+
17
+ # @!attribute [r] account_number
18
+ # Customer's account number (maps to `NumeroDeCuenta`).
19
+ # @return [String]
20
+ property :account_number, String
21
+ validates_presence_of :account_number
22
+
23
+ # @!attribute [r] subtotal
24
+ # Sum of all line totals (i.e. taxes not included) (calculated, maps to `SubTotal`).
25
+ # @return [GOBL::Num::Amount]
26
+ property :subtotal, GOBL::Num::Amount
27
+
28
+ # @!attribute [r] total
29
+ # Grand total after taxes have been applied (calculated, maps to `Total`).
30
+ # @return [GOBL::Num::Amount]
31
+ property :total, GOBL::Num::Amount
32
+
33
+ # @!attribute [r] lines
34
+ # List of fuel purchases made with the customer's e-wallets (maps to `Conceptos`).
35
+ # @return [Array<FuelAccountLine>]
36
+ property :lines, [FuelAccountLine]
37
+ validates_presence_of :lines
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FuelAccountItem provides the details of a fuel purchase.
13
+ class FuelAccountItem < GOBL::Object
14
+ # The Schema ID of the GOBL FuelAccountItem structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance#/$defs/FuelAccountItem'
16
+
17
+ # @!attribute [r] type
18
+ # Type of fuel (one of `c_ClaveTipoCombustible` codes, maps to `TipoCombustible`).
19
+ # @return [GOBL::CBC::Code]
20
+ property :type, GOBL::CBC::Code
21
+ validates_presence_of :type
22
+
23
+ # @!attribute [r] unit
24
+ # Reference unit of measure used in the price and the quantity (maps to `Unidad`).
25
+ # @return [GOBL::Org::Unit]
26
+ property :unit, GOBL::Org::Unit
27
+
28
+ # @!attribute [r] name
29
+ # Name of the fuel (maps to `NombreCombustible`).
30
+ # @return [String]
31
+ property :name, String
32
+ validates_presence_of :name
33
+
34
+ # @!attribute [r] price
35
+ # Base price of a single unit of the fuel without taxes (maps to `ValorUnitario`).
36
+ # @return [GOBL::Num::Amount]
37
+ property :price, GOBL::Num::Amount
38
+ validates_presence_of :price
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FuelAccountLine represents a single fuel purchase made with an e-wallet issued by the invoice's supplier.
13
+ class FuelAccountLine < GOBL::Object
14
+ # The Schema ID of the GOBL FuelAccountLine structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance#/$defs/FuelAccountLine'
16
+
17
+ # @!attribute [r] e_wallet_id
18
+ # Identifier of the e-wallet used to make the purchase (maps to `Identificador`).
19
+ # @return [GOBL::CBC::Code]
20
+ property :e_wallet_id, GOBL::CBC::Code
21
+ validates_presence_of :e_wallet_id
22
+
23
+ # @!attribute [r] purchase_date_time
24
+ # Date and time of the purchase (maps to `Fecha`).
25
+ # @return [GOBL::Cal::DateTime]
26
+ property :purchase_date_time, GOBL::Cal::DateTime
27
+ validates_presence_of :purchase_date_time
28
+
29
+ # @!attribute [r] vendor_tax_code
30
+ # Tax Identity Code of the fuel's vendor (maps to `Rfc`)
31
+ # @return [GOBL::CBC::Code]
32
+ property :vendor_tax_code, GOBL::CBC::Code
33
+ validates_presence_of :vendor_tax_code
34
+
35
+ # @!attribute [r] service_station_code
36
+ # Code of the service station where the purchase was made (maps to `ClaveEstacion`).
37
+ # @return [GOBL::CBC::Code]
38
+ property :service_station_code, GOBL::CBC::Code
39
+ validates_presence_of :service_station_code
40
+
41
+ # @!attribute [r] quantity
42
+ # Amount of fuel units purchased (maps to `Cantidad`)
43
+ # @return [GOBL::Num::Amount]
44
+ property :quantity, GOBL::Num::Amount
45
+ validates_presence_of :quantity
46
+
47
+ # @!attribute [r] item
48
+ # Details of the fuel purchased.
49
+ # @return [FuelAccountItem]
50
+ property :item, FuelAccountItem
51
+ validates_presence_of :item
52
+
53
+ # @!attribute [r] purchase_code
54
+ # Identifier of the purchase (maps to `FolioOperacion`).
55
+ # @return [GOBL::CBC::Code]
56
+ property :purchase_code, GOBL::CBC::Code
57
+ validates_presence_of :purchase_code
58
+
59
+ # @!attribute [r] total
60
+ # Result of quantity multiplied by the unit price (maps to `Importe`).
61
+ # @return [GOBL::Num::Amount]
62
+ property :total, GOBL::Num::Amount
63
+ validates_presence_of :total
64
+
65
+ # @!attribute [r] taxes
66
+ # Map of taxes applied to the purchase (maps to `Traslados`).
67
+ # @return [Array<FuelAccountTax>]
68
+ property :taxes, [FuelAccountTax]
69
+ validates_presence_of :taxes
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Regimes
11
+ module Mx
12
+ # FuelAccountTax represents a single tax applied to a fuel purchase.
13
+ class FuelAccountTax < GOBL::Object
14
+ # The Schema ID of the GOBL FuelAccountTax structure
15
+ SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance#/$defs/FuelAccountTax'
16
+
17
+ # @!attribute [r] code
18
+ # Code that identifies the tax ("IVA" or "IEPS", maps to `Impuesto`)
19
+ # @return [GOBL::CBC::Code]
20
+ property :code, GOBL::CBC::Code
21
+ validates_presence_of :code
22
+
23
+ # @!attribute [r] rate
24
+ # Rate applicable to either the line total (tasa) or the line quantity (cuota) (maps to `TasaOCuota`).
25
+ # @return [GOBL::Num::Amount]
26
+ property :rate, GOBL::Num::Amount
27
+ validates_presence_of :rate
28
+
29
+ # @!attribute [r] amount
30
+ # Total amount of the tax once the rate has been applied (maps to `Importe`).
31
+ # @return [GOBL::Num::Amount]
32
+ property :amount, GOBL::Num::Amount
33
+ validates_presence_of :amount
34
+ end
35
+ end
36
+ end
37
+ end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -14,16 +14,24 @@ module GOBL
14
14
  SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Category'
15
15
 
16
16
  # @!attribute [r] code
17
+ # Code to be used in documents
17
18
  # @return [GOBL::CBC::Code]
18
19
  property :code, GOBL::CBC::Code
19
20
  validates_presence_of :code
20
21
 
21
22
  # @!attribute [r] name
23
+ # Short name of the category to be used instead of code in output
22
24
  # @return [GOBL::I18n::String]
23
25
  property :name, GOBL::I18n::String
24
26
  validates_presence_of :name
25
27
 
28
+ # @!attribute [r] title
29
+ # Human name for the code to use for titles
30
+ # @return [GOBL::I18n::String]
31
+ property :title, GOBL::I18n::String
32
+
26
33
  # @!attribute [r] desc
34
+ # Useful description of the category.
27
35
  # @return [GOBL::I18n::String]
28
36
  property :desc, GOBL::I18n::String
29
37
 
@@ -33,7 +41,7 @@ module GOBL
33
41
  property :retained, Boolean
34
42
 
35
43
  # @!attribute [r] rate_required
36
- # RateRequired when true implies that when a tax combo is defined using this category that one of the rates must be defined.
44
+ # RateRequired when true implies that when a tax combo is defined using this category that one of the rate's keys must be defined. This is normally needed for regimes that categorize taxes in local document formats as opposed to grouping by percentage values.
37
45
  # @return [Boolean]
38
46
  property :rate_required, Boolean
39
47
 
@@ -43,7 +51,7 @@ module GOBL
43
51
  property :rates, [Rate]
44
52
 
45
53
  # @!attribute [r] extensions
46
- # Extensions defines a list of keys for codes to use as an alternative to choosing a rate for the tax category. Every key must be defined in the Regime's extensions table.
54
+ # Extensions defines a list of extension keys that may be used or required as an alternative or alongside choosing a rate for the tax category. Every key must be defined in the Regime's extensions table.
47
55
  # @return [Array<GOBL::CBC::Key>]
48
56
  property :extensions, [GOBL::CBC::Key]
49
57
 
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -36,8 +36,8 @@ module GOBL
36
36
 
37
37
  # @!attribute [r] ext
38
38
  # Local codes that apply for a given rate or percentage that need to be identified and validated.
39
- # @return [GOBL::CBC::CodeMap]
40
- property :ext, GOBL::CBC::CodeMap
39
+ # @return [GOBL::Tax::ExtMap]
40
+ property :ext, GOBL::Tax::ExtMap
41
41
  end
42
42
  end
43
43
  end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Tax
11
+ # CorrectionDefinition contains details about what can be defined in .
12
+ class CorrectionDefinition < GOBL::Object
13
+ # The Schema ID of the GOBL CorrectionDefinition structure
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/CorrectionDefinition'
15
+
16
+ # @!attribute [r] schema
17
+ # Partial or complete schema URL for the document type supported by correction.
18
+ # @return [String]
19
+ property :schema, String
20
+ validates_presence_of :schema
21
+
22
+ # @!attribute [r] types
23
+ # The types of sub-documents supported by the regime
24
+ # @return [Array<GOBL::CBC::Key>]
25
+ property :types, [GOBL::CBC::Key]
26
+
27
+ # @!attribute [r] extensions
28
+ # Extension keys that can be included
29
+ # @return [Array<GOBL::CBC::Key>]
30
+ property :extensions, [GOBL::CBC::Key]
31
+
32
+ # @!attribute [r] reason_required
33
+ # ReasonRequired when true implies that a reason must be provided
34
+ # @return [Boolean]
35
+ property :reason_required, Boolean
36
+
37
+ # @!attribute [r] stamps
38
+ # Stamps that must be copied from the preceding document.
39
+ # @return [Array<GOBL::CBC::Key>]
40
+ property :stamps, [GOBL::CBC::Key]
41
+ end
42
+ end
43
+ end
@@ -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.67.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Tax
11
+ # ExtMap is a map of extension keys to either a code or a key.
12
+ class ExtMap < 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.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -20,9 +20,10 @@ module GOBL
20
20
  validates_presence_of :key
21
21
 
22
22
  # @!attribute [r] name
23
- # Short name for the key, if relevant.
23
+ # Short name for the key.
24
24
  # @return [GOBL::I18n::String]
25
25
  property :name, GOBL::I18n::String
26
+ validates_presence_of :name
26
27
 
27
28
  # @!attribute [r] desc
28
29
  # Description offering more details about when the key should be used.
@@ -34,6 +35,11 @@ module GOBL
34
35
  # @return [Array<CodeDefinition>]
35
36
  property :codes, [CodeDefinition]
36
37
 
38
+ # @!attribute [r] keys
39
+ # Keys is used instead of codes to define a further sub-set of keys that can be used alongside this one.
40
+ # @return [Array<KeyDefinition>]
41
+ property :keys, [KeyDefinition]
42
+
37
43
  # @!attribute [r] map
38
44
  # Map helps map local keys to specific codes, useful for converting the described key into a local code.
39
45
  # @return [GOBL::CBC::CodeMap]
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -20,8 +20,8 @@ module GOBL
20
20
 
21
21
  # @!attribute [r] ext
22
22
  # If the rate is defined with extensions, they'll be used to group by also.
23
- # @return [GOBL::CBC::CodeMap]
24
- property :ext, GOBL::CBC::CodeMap
23
+ # @return [GOBL::Tax::ExtMap]
24
+ property :ext, GOBL::Tax::ExtMap
25
25
 
26
26
  # @!attribute [r] base
27
27
  # Base amount that the percentage is applied to.
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.55.0
6
+ ## Generated with GOBL v0.67.0
7
7
  ##
8
8
 
9
9
  module GOBL