gobl 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/data/regimes/at.json +155 -0
  4. data/data/regimes/be.json +164 -0
  5. data/data/regimes/ca.json +9 -0
  6. data/data/regimes/ch.json +153 -0
  7. data/data/regimes/co.json +80 -122
  8. data/data/regimes/de.json +2 -2
  9. data/data/regimes/es.json +71 -62
  10. data/data/regimes/fr.json +2 -2
  11. data/data/regimes/gb.json +8 -0
  12. data/data/regimes/gr.json +591 -0
  13. data/data/regimes/it.json +37 -22
  14. data/data/regimes/mx.json +15 -3
  15. data/data/regimes/nl.json +8 -0
  16. data/data/regimes/pl.json +65 -8
  17. data/data/regimes/pt.json +50 -39
  18. data/data/regimes/us.json +9 -0
  19. data/lib/generated/gobl/bill/charge.rb +6 -7
  20. data/lib/generated/gobl/bill/correction_options.rb +5 -1
  21. data/lib/generated/gobl/bill/delivery.rb +0 -1
  22. data/lib/generated/gobl/bill/discount.rb +5 -6
  23. data/lib/generated/gobl/bill/document_reference.rb +2 -3
  24. data/lib/generated/gobl/bill/invoice.rb +4 -5
  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 +0 -1
  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/preceding.rb +4 -5
  32. data/lib/generated/gobl/bill/tax.rb +5 -1
  33. data/lib/generated/gobl/bill/totals.rb +0 -1
  34. data/lib/generated/gobl/cal/date.rb +0 -1
  35. data/lib/generated/gobl/cal/date_time.rb +0 -1
  36. data/lib/generated/gobl/cal/period.rb +0 -1
  37. data/lib/generated/gobl/cbc/code.rb +0 -1
  38. data/lib/generated/gobl/cbc/code_definition.rb +0 -1
  39. data/lib/generated/gobl/cbc/code_map.rb +0 -1
  40. data/lib/generated/gobl/cbc/key.rb +0 -1
  41. data/lib/generated/gobl/cbc/key_definition.rb +0 -1
  42. data/lib/generated/gobl/cbc/meta.rb +0 -1
  43. data/lib/generated/gobl/cbc/note.rb +0 -1
  44. data/lib/generated/gobl/currency/amount.rb +33 -0
  45. data/lib/generated/gobl/currency/code.rb +118 -105
  46. data/lib/generated/gobl/currency/exchange_rate.rb +17 -7
  47. data/lib/generated/gobl/dsig/digest.rb +0 -1
  48. data/lib/generated/gobl/dsig/signature.rb +0 -1
  49. data/lib/generated/gobl/envelope.rb +0 -1
  50. data/lib/generated/gobl/head/header.rb +2 -3
  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 +0 -1
  55. data/lib/generated/gobl/note/message.rb +5 -1
  56. data/lib/generated/gobl/org/address.rb +3 -4
  57. data/lib/generated/gobl/org/coordinates.rb +0 -1
  58. data/lib/generated/gobl/org/email.rb +3 -4
  59. data/lib/generated/gobl/org/identity.rb +3 -4
  60. data/lib/generated/gobl/org/image.rb +3 -4
  61. data/lib/generated/gobl/org/inbox.rb +3 -4
  62. data/lib/generated/gobl/org/item.rb +8 -4
  63. data/lib/generated/gobl/org/name.rb +3 -4
  64. data/lib/generated/gobl/org/party.rb +8 -4
  65. data/lib/generated/gobl/org/person.rb +3 -4
  66. data/lib/generated/gobl/org/registration.rb +7 -3
  67. data/lib/generated/gobl/org/telephone.rb +3 -4
  68. data/lib/generated/gobl/org/unit.rb +0 -1
  69. data/lib/generated/gobl/org/website.rb +4 -5
  70. data/lib/generated/gobl/pay/advance.rb +3 -4
  71. data/lib/generated/gobl/pay/card.rb +0 -1
  72. data/lib/generated/gobl/pay/credit_transfer.rb +0 -1
  73. data/lib/generated/gobl/pay/direct_debit.rb +0 -1
  74. data/lib/generated/gobl/pay/due_date.rb +0 -1
  75. data/lib/generated/gobl/pay/instructions.rb +0 -1
  76. data/lib/generated/gobl/pay/online.rb +12 -8
  77. data/lib/generated/gobl/pay/terms.rb +0 -1
  78. data/lib/generated/gobl/regimes/mx/food_vouchers.rb +0 -1
  79. data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +0 -1
  80. data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +0 -1
  81. data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +0 -1
  82. data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +0 -1
  83. data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +0 -2
  84. data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +11 -9
  85. data/lib/generated/gobl/schema/object.rb +0 -1
  86. data/lib/generated/gobl/tax/category.rb +1 -2
  87. data/lib/generated/gobl/tax/category_total.rb +0 -1
  88. data/lib/generated/gobl/tax/combo.rb +1 -2
  89. data/lib/generated/gobl/tax/correction_definition.rb +0 -1
  90. data/lib/generated/gobl/tax/extensions.rb +0 -1
  91. data/lib/generated/gobl/tax/identity.rb +10 -16
  92. data/lib/generated/gobl/tax/rate.rb +0 -1
  93. data/lib/generated/gobl/tax/rate_total.rb +1 -2
  94. data/lib/generated/gobl/tax/rate_total_surcharge.rb +0 -1
  95. data/lib/generated/gobl/tax/rate_value.rb +5 -1
  96. data/lib/generated/gobl/tax/regime.rb +15 -11
  97. data/lib/generated/gobl/tax/scenario.rb +0 -1
  98. data/lib/generated/gobl/tax/scenario_set.rb +0 -1
  99. data/lib/generated/gobl/tax/set.rb +0 -1
  100. data/lib/generated/gobl/tax/source.rb +0 -1
  101. data/lib/generated/gobl/tax/total.rb +0 -1
  102. data/lib/gobl/version.rb +1 -1
  103. metadata +7 -3
  104. data/lib/generated/gobl/uuid/uuid.rb +0 -17
@@ -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 identity of this item
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] 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]
@@ -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 identity code
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] alias
22
21
  # What the person would like to be called
@@ -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/party'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identity code
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] name
22
21
  # Legal name or representation of the organization.
@@ -29,6 +28,11 @@ module GOBL
29
28
  # @return [String]
30
29
  property :alias, String
31
30
 
31
+ # @!attribute [r] label
32
+ # 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.
33
+ # @return [String]
34
+ property :label, String
35
+
32
36
  # @!attribute [r] tax_id
33
37
  # The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes.
34
38
  # @return [GOBL::Tax::Identity]
@@ -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/person'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identity code
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] name
22
21
  # Complete details on the name of the person
@@ -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,8 +13,9 @@ module GOBL
14
13
  SCHEMA_ID = 'https://gobl.org/draft-0/org/registration'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # @return [GOBL::UUID::UUID]
18
- property :uuid, GOBL::UUID::UUID
16
+ # Universally Unique Identifier.
17
+ # @return [String]
18
+ property :uuid, String
19
19
 
20
20
  # @!attribute [r] capital
21
21
  # @return [GOBL::Num::Amount]
@@ -52,6 +52,10 @@ module GOBL
52
52
  # @!attribute [r] entry
53
53
  # @return [String]
54
54
  property :entry, String
55
+
56
+ # @!attribute [r] other
57
+ # @return [String]
58
+ property :other, String
55
59
  end
56
60
  end
57
61
  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/telephone'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identity code
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] label
22
21
  # Identifier for this number.
@@ -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,12 +13,12 @@ module GOBL
14
13
  SCHEMA_ID = 'https://gobl.org/draft-0/org/website'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identity code
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] label
22
- # Identifier for this number.
21
+ # Label for the website to show alongside the URL.
23
22
  # @return [String]
24
23
  property :label, String
25
24
 
@@ -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/pay/advance'
15
14
 
16
15
  # @!attribute [r] uuid
17
- # Unique identifier for this advance.
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] date
22
21
  # When the advance was made.
@@ -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
@@ -13,16 +12,21 @@ module GOBL
13
12
  # The Schema ID of the GOBL Online structure
14
13
  SCHEMA_ID = 'https://gobl.org/draft-0/pay/instructions#/$defs/Online'
15
14
 
16
- # @!attribute [r] name
17
- # Descriptive name given to the online provider.
15
+ # @!attribute [r] key
16
+ # Key identifier for this online payment method.
17
+ # @return [GOBL::CBC::Key]
18
+ property :key, GOBL::CBC::Key
19
+
20
+ # @!attribute [r] label
21
+ # Descriptive label for the online provider.
18
22
  # @return [String]
19
- property :name, String
23
+ property :label, String
20
24
 
21
- # @!attribute [r] addr
22
- # Full URL to be used for payment.
25
+ # @!attribute [r] url
26
+ # URL to be used for payment.
23
27
  # @return [String]
24
- property :addr, String
25
- validates_presence_of :addr
28
+ property :url, String
29
+ validates_presence_of :url
26
30
  end
27
31
  end
28
32
  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
@@ -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
@@ -60,7 +59,6 @@ module GOBL
60
59
  # Result of quantity multiplied by the unit price (maps to `Importe`).
61
60
  # @return [GOBL::Num::Amount]
62
61
  property :total, GOBL::Num::Amount
63
- validates_presence_of :total
64
62
 
65
63
  # @!attribute [r] taxes
66
64
  # Map of taxes applied to the purchase (maps to `Traslados`).
@@ -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,23 +13,26 @@ module GOBL
14
13
  # The Schema ID of the GOBL FuelAccountTax structure
15
14
  SCHEMA_ID = 'https://gobl.org/draft-0/regimes/mx/fuel-account-balance#/$defs/FuelAccountTax'
16
15
 
17
- # @!attribute [r] code
18
- # Code that identifies the tax ("IVA" or "IEPS", maps to `Impuesto`)
16
+ # @!attribute [r] cat
17
+ # Category that identifies the tax ("VAT" or "IEPS", maps to `Impuesto`)
19
18
  # @return [GOBL::CBC::Code]
20
- property :code, GOBL::CBC::Code
21
- validates_presence_of :code
19
+ property :cat, GOBL::CBC::Code
20
+ validates_presence_of :cat
21
+
22
+ # @!attribute [r] percent
23
+ # Percent applicable to the line total (tasa) to use instead of Rate (maps to `TasaoCuota`)
24
+ # @return [GOBL::Num::Percentage]
25
+ property :percent, GOBL::Num::Percentage
22
26
 
23
27
  # @!attribute [r] rate
24
- # Rate applicable to either the line total (tasa) or the line quantity (cuota) (maps to `TasaOCuota`).
28
+ # Rate is a fixed fee to apply to the line quantity (cuota) (maps to `TasaOCuota`)
25
29
  # @return [GOBL::Num::Amount]
26
30
  property :rate, GOBL::Num::Amount
27
- validates_presence_of :rate
28
31
 
29
32
  # @!attribute [r] amount
30
- # Total amount of the tax once the rate has been applied (maps to `Importe`).
33
+ # Total amount of the tax once the percent or rate has been applied (maps to `Importe`).
31
34
  # @return [GOBL::Num::Amount]
32
35
  property :amount, GOBL::Num::Amount
33
- validates_presence_of :amount
34
36
  end
35
37
  end
36
38
  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
@@ -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
@@ -41,7 +40,7 @@ module GOBL
41
40
  property :retained, Boolean
42
41
 
43
42
  # @!attribute [r] rate_required
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.
43
+ # 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. Try to avoid using this. It is better for rates to be determined by the percentage and conditions, not the rate key.
45
44
  # @return [Boolean]
46
45
  property :rate_required, Boolean
47
46
 
@@ -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
@@ -25,7 +24,7 @@ module GOBL
25
24
  property :rate, GOBL::CBC::Key
26
25
 
27
26
  # @!attribute [r] percent
28
- # Percent defines the percentage set manually or determined from the rate key (calculated if rate present).
27
+ # Percent defines the percentage set manually or determined from the rate key (calculated if rate present). A nil percent implies that this tax combo is **exempt** from tax.
29
28
  # @return [GOBL::Num::Percentage]
30
29
  property :percent, GOBL::Num::Percentage
31
30
 
@@ -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,41 +3,35 @@
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
10
9
  module Tax
11
- # Identity stores the details required to identify an entity for tax purposes.
10
+ # Identity stores the details required to identify an entity for tax purposes in a specific country.
12
11
  class Identity < GOBL::Object
13
12
  # The Schema ID of the GOBL Identity structure
14
13
  SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity'
15
14
 
16
- # @!attribute [r] uuid
17
- # Unique universal identity code for this tax identity.
18
- # @return [GOBL::UUID::UUID]
19
- property :uuid, GOBL::UUID::UUID
20
-
21
15
  # @!attribute [r] country
22
16
  # ISO country code for Where the tax identity was issued.
23
17
  # @return [GOBL::L10n::CountryCode]
24
18
  property :country, GOBL::L10n::CountryCode
25
19
  validates_presence_of :country
26
20
 
27
- # @!attribute [r] type
28
- # Type is set according the requirements of each regime, some have a single tax document type code, others require a choice to be made.
29
- # @return [GOBL::CBC::Key]
30
- property :type, GOBL::CBC::Key
31
-
32
21
  # @!attribute [r] code
33
22
  # Normalized code shown on the original identity document.
34
23
  # @return [GOBL::CBC::Code]
35
24
  property :code, GOBL::CBC::Code
36
25
 
37
- # @!attribute [r] meta
38
- # Additional details that may be required.
39
- # @return [GOBL::CBC::Meta]
40
- property :meta, GOBL::CBC::Meta
26
+ # @!attribute [r] type
27
+ # Type is set according to the requirements of each regime, some have a single tax document type code, others require a choice to be made. Deprecated: Tax Identities should only be used for VAT or similar codes for companies. Use the identities array for other types of identification.
28
+ # @return [GOBL::CBC::Key]
29
+ property :type, GOBL::CBC::Key
30
+
31
+ # @!attribute [r] zone
32
+ # Zone identifies a sub-locality within a country. Deprecated: Removed 2024-03-14 in favour of using tax tags and extensions with local data when required. Maintained here to support data migration.
33
+ # @return [GOBL::L10n::Code]
34
+ property :zone, GOBL::L10n::Code
41
35
  end
42
36
  end
43
37
  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
@@ -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
@@ -30,7 +29,7 @@ module GOBL
30
29
  validates_presence_of :base
31
30
 
32
31
  # @!attribute [r] percent
33
- # Percentage of the rate, which may be nil for exempt rates.
32
+ # Percentage of the rate. Will be nil when taxes are **exempt**.
34
33
  # @return [GOBL::Num::Percentage]
35
34
  property :percent, GOBL::Num::Percentage
36
35
 
@@ -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,6 +17,11 @@ module GOBL
18
17
  # @return [Array<GOBL::CBC::Key>]
19
18
  property :tags, [GOBL::CBC::Key]
20
19
 
20
+ # @!attribute [r] ext
21
+ # Ext map of keys that can be used to filter to determine if the rate applies.
22
+ # @return [GOBL::Tax::Extensions]
23
+ property :ext, GOBL::Tax::Extensions
24
+
21
25
  # @!attribute [r] since
22
26
  # Date from which this value should be applied.
23
27
  # @return [GOBL::Cal::Date]
@@ -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
@@ -52,25 +51,30 @@ module GOBL
52
51
  # @return [Array<GOBL::CBC::KeyDefinition>]
53
52
  property :tags, [GOBL::CBC::KeyDefinition]
54
53
 
55
- # @!attribute [r] identity_types
56
- # Identity types specific for the regime and may be validated against.
57
- # @return [Array<GOBL::CBC::KeyDefinition>]
58
- property :identity_types, [GOBL::CBC::KeyDefinition]
59
-
60
54
  # @!attribute [r] extensions
61
55
  # Extensions defines the keys that can be used for extended or extra data inside the regime that is specific to the regime and cannot be easily determined from other GOBL structures. Typically these are used to define local codes for suppliers, customers, products, or tax rates.
62
56
  # @return [Array<GOBL::CBC::KeyDefinition>]
63
57
  property :extensions, [GOBL::CBC::KeyDefinition]
64
58
 
65
- # @!attribute [r] charge_types
66
- # Charge types specific for the regime and may be validated or used in the UI as suggestions
59
+ # @!attribute [r] tax_identity_type_keys
60
+ # Tax Identity types specific for the regime and may be validated against.
61
+ # @return [Array<GOBL::CBC::KeyDefinition>]
62
+ property :tax_identity_type_keys, [GOBL::CBC::KeyDefinition]
63
+
64
+ # @!attribute [r] identity_keys
65
+ # Identity keys used in addition to regular tax identities and specific for the regime that may be validated against.
66
+ # @return [Array<GOBL::CBC::KeyDefinition>]
67
+ property :identity_keys, [GOBL::CBC::KeyDefinition]
68
+
69
+ # @!attribute [r] charge_keys
70
+ # Charge keys specific for the regime and may be validated or used in the UI as suggestions
67
71
  # @return [Array<GOBL::CBC::KeyDefinition>]
68
- property :charge_types, [GOBL::CBC::KeyDefinition]
72
+ property :charge_keys, [GOBL::CBC::KeyDefinition]
69
73
 
70
- # @!attribute [r] payment_means
74
+ # @!attribute [r] payment_means_keys
71
75
  # PaymentMeansKeys specific for the regime that extend the original base payment means keys.
72
76
  # @return [Array<GOBL::CBC::KeyDefinition>]
73
- property :payment_means, [GOBL::CBC::KeyDefinition]
77
+ property :payment_means_keys, [GOBL::CBC::KeyDefinition]
74
78
 
75
79
  # @!attribute [r] inbox_keys
76
80
  # InboxKeys specific to the regime that can be used to identify where a document should be forwarded to.
@@ -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