gobl 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/lib/extensions.rb +1 -1
  3. data/lib/gobl/bill/advances.rb +1 -1
  4. data/lib/gobl/bill/charge.rb +3 -3
  5. data/lib/gobl/bill/delivery.rb +1 -1
  6. data/lib/gobl/bill/discount.rb +3 -3
  7. data/lib/gobl/bill/exchange_rates.rb +1 -1
  8. data/lib/gobl/bill/invoice.rb +5 -5
  9. data/lib/gobl/bill/invoice_type.rb +1 -1
  10. data/lib/gobl/bill/line.rb +3 -3
  11. data/lib/gobl/bill/line_charge.rb +1 -1
  12. data/lib/gobl/bill/line_discount.rb +1 -1
  13. data/lib/gobl/bill/ordering.rb +1 -1
  14. data/lib/gobl/bill/outlay.rb +1 -1
  15. data/lib/gobl/bill/payment.rb +1 -1
  16. data/lib/gobl/bill/preceding.rb +5 -5
  17. data/lib/gobl/bill/scheme_keys.rb +2 -2
  18. data/lib/gobl/bill/tax.rb +5 -5
  19. data/lib/gobl/bill/totals.rb +1 -1
  20. data/lib/gobl/cal/date.rb +1 -1
  21. data/lib/gobl/cal/period.rb +1 -1
  22. data/lib/gobl/{org → cbc}/code.rb +3 -3
  23. data/lib/gobl/{org → cbc}/key.rb +3 -3
  24. data/lib/gobl/{org → cbc}/meta.rb +2 -2
  25. data/lib/gobl/{org → cbc}/note.rb +3 -3
  26. data/lib/gobl/{org → cbc}/note_key.rb +3 -3
  27. data/lib/gobl/{org → cbc}/stamp.rb +5 -5
  28. data/lib/gobl/currency/code.rb +1 -1
  29. data/lib/gobl/currency/exchange_rate.rb +1 -1
  30. data/lib/gobl/document.rb +1 -1
  31. data/lib/gobl/dsig/digest.rb +1 -1
  32. data/lib/gobl/dsig/signature.rb +1 -1
  33. data/lib/gobl/envelope.rb +1 -1
  34. data/lib/gobl/header.rb +5 -5
  35. data/lib/gobl/i18n/string.rb +1 -1
  36. data/lib/gobl/l10n/code.rb +1 -1
  37. data/lib/gobl/l10n/country_code.rb +1 -1
  38. data/lib/gobl/map.rb +5 -1
  39. data/lib/gobl/note/message.rb +3 -3
  40. data/lib/gobl/org/address.rb +5 -6
  41. data/lib/gobl/org/coordinates.rb +1 -1
  42. data/lib/gobl/org/email.rb +3 -3
  43. data/lib/gobl/org/inbox.rb +5 -5
  44. data/lib/gobl/org/item.rb +3 -3
  45. data/lib/gobl/org/item_code.rb +1 -1
  46. data/lib/gobl/org/name.rb +3 -3
  47. data/lib/gobl/org/party.rb +5 -5
  48. data/lib/gobl/org/person.rb +3 -3
  49. data/lib/gobl/org/registration.rb +1 -1
  50. data/lib/gobl/org/telephone.rb +1 -1
  51. data/lib/gobl/org/unit.rb +1 -1
  52. data/lib/gobl/pay/advance.rb +1 -1
  53. data/lib/gobl/pay/card.rb +1 -1
  54. data/lib/gobl/pay/credit_transfer.rb +1 -1
  55. data/lib/gobl/pay/direct_debit.rb +1 -1
  56. data/lib/gobl/pay/due_date.rb +1 -1
  57. data/lib/gobl/pay/instructions.rb +3 -3
  58. data/lib/gobl/pay/method_key.rb +1 -1
  59. data/lib/gobl/pay/online.rb +1 -1
  60. data/lib/gobl/pay/term_key.rb +1 -1
  61. data/lib/gobl/pay/terms.rb +1 -1
  62. data/lib/gobl/tax/category.rb +4 -4
  63. data/lib/gobl/tax/category_total.rb +3 -3
  64. data/lib/gobl/tax/combo.rb +5 -5
  65. data/lib/gobl/{org/tax_identity.rb → tax/identity.rb} +11 -11
  66. data/lib/gobl/tax/rate.rb +4 -4
  67. data/lib/gobl/tax/rate_total.rb +3 -3
  68. data/lib/gobl/tax/rate_total_surcharge.rb +1 -1
  69. data/lib/gobl/tax/rate_value.rb +2 -2
  70. data/lib/gobl/tax/{region.rb → regime.rb} +14 -14
  71. data/lib/gobl/tax/scheme.rb +8 -8
  72. data/lib/gobl/tax/schemes.rb +1 -1
  73. data/lib/gobl/tax/set.rb +1 -1
  74. data/lib/gobl/{org → tax}/source_key.rb +3 -3
  75. data/lib/gobl/tax/total.rb +1 -1
  76. data/lib/gobl/tax/zone.rb +43 -0
  77. data/lib/gobl/uuid/uuid.rb +1 -1
  78. data/lib/gobl/value.rb +19 -0
  79. data/lib/gobl/version.rb +1 -1
  80. data/lib/gobl.rb +2 -1
  81. data/lib/gobl_extensions/tax/regime_helper.rb +35 -0
  82. metadata +14 -20
  83. data/data/tax/CO.json +0 -10212
  84. data/data/tax/ES.json +0 -902
  85. data/data/tax/FR.json +0 -47
  86. data/data/tax/GB.json +0 -56
  87. data/data/tax/NL.json +0 -60
  88. data/lib/gobl/tax/localities.rb +0 -14
  89. data/lib/gobl/tax/locality.rb +0 -34
  90. data/lib/gobl_extensions/tax/region_helper.rb +0 -35
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -20,14 +20,14 @@ module GOBL
20
20
 
21
21
  # @!attribute [r] key
22
22
  # Type of inbox being defined.
23
- # @return [GOBL::Org::Key]
24
- property :key, GOBL::Org::Key
23
+ # @return [GOBL::CBC::Key]
24
+ property :key, GOBL::CBC::Key
25
25
  validates :key, presence: true
26
26
 
27
27
  # @!attribute [r] role
28
28
  # Role assigned to this inbox that may be relevant for the consumer.
29
- # @return [GOBL::Org::Key]
30
- property :role, GOBL::Org::Key
29
+ # @return [GOBL::CBC::Key]
30
+ property :role, GOBL::CBC::Key
31
31
 
32
32
  # @!attribute [r] name
33
33
  # Human name for the inbox.
data/lib/gobl/org/item.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -62,8 +62,8 @@ module GOBL
62
62
 
63
63
  # @!attribute [r] meta
64
64
  # Additional meta information that may be useful
65
- # @return [GOBL::Org::Meta]
66
- property :meta, GOBL::Org::Meta
65
+ # @return [GOBL::CBC::Meta]
66
+ property :meta, GOBL::CBC::Meta
67
67
  end
68
68
  end
69
69
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/org/name.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -57,8 +57,8 @@ module GOBL
57
57
 
58
58
  # @!attribute [r] meta
59
59
  # Any additional useful data.
60
- # @return [GOBL::Org::Meta]
61
- property :meta, GOBL::Org::Meta
60
+ # @return [GOBL::CBC::Meta]
61
+ property :meta, GOBL::CBC::Meta
62
62
  end
63
63
  end
64
64
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -25,8 +25,8 @@ module GOBL
25
25
 
26
26
  # @!attribute [r] tax_id
27
27
  # 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.
28
- # @return [GOBL::Org::TaxIdentity]
29
- property :tax_id, GOBL::Org::TaxIdentity
28
+ # @return [GOBL::Tax::Identity]
29
+ property :tax_id, GOBL::Tax::Identity
30
30
 
31
31
  # @!attribute [r] name
32
32
  # Legal name or representation of the organization.
@@ -71,8 +71,8 @@ module GOBL
71
71
 
72
72
  # @!attribute [r] meta
73
73
  # Any additional semi-structured information that does not fit into the rest of the party.
74
- # @return [GOBL::Org::Meta]
75
- property :meta, GOBL::Org::Meta
74
+ # @return [GOBL::CBC::Meta]
75
+ property :meta, GOBL::CBC::Meta
76
76
  end
77
77
  end
78
78
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -46,8 +46,8 @@ module GOBL
46
46
 
47
47
  # @!attribute [r] meta
48
48
  # Data about the data.
49
- # @return [GOBL::Org::Meta]
50
- property :meta, GOBL::Org::Meta
49
+ # @return [GOBL::CBC::Meta]
50
+ property :meta, GOBL::CBC::Meta
51
51
  end
52
52
  end
53
53
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/org/unit.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/pay/card.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -56,8 +56,8 @@ module GOBL
56
56
 
57
57
  # @!attribute [r] meta
58
58
  # Non-structured additional data that may be useful.
59
- # @return [GOBL::Org::Meta]
60
- property :meta, GOBL::Org::Meta
59
+ # @return [GOBL::CBC::Meta]
60
+ property :meta, GOBL::CBC::Meta
61
61
  end
62
62
  end
63
63
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -11,11 +11,11 @@ module GOBL
11
11
  # Category contains the definition of a general type of tax inside a region.
12
12
  class Category < GOBL::Object
13
13
  # The Schema ID of the GOBL Category structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/tax/region#/$defs/Category'
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Category'
15
15
 
16
16
  # @!attribute [r] code
17
- # @return [GOBL::Org::Code]
18
- property :code, GOBL::Org::Code
17
+ # @return [GOBL::CBC::Code]
18
+ property :code, GOBL::CBC::Code
19
19
  validates :code, presence: true
20
20
 
21
21
  # @!attribute [r] name
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -14,8 +14,8 @@ module GOBL
14
14
  SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/CategoryTotal'
15
15
 
16
16
  # @!attribute [r] code
17
- # @return [GOBL::Org::Code]
18
- property :code, GOBL::Org::Code
17
+ # @return [GOBL::CBC::Code]
18
+ property :code, GOBL::CBC::Code
19
19
  validates :code, presence: true
20
20
 
21
21
  # @!attribute [r] retained
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -15,14 +15,14 @@ module GOBL
15
15
 
16
16
  # @!attribute [r] cat
17
17
  # Tax category code from those available inside a region.
18
- # @return [GOBL::Org::Code]
19
- property :cat, GOBL::Org::Code
18
+ # @return [GOBL::CBC::Code]
19
+ property :cat, GOBL::CBC::Code
20
20
  validates :cat, presence: true
21
21
 
22
22
  # @!attribute [r] rate
23
23
  # Rate within a category to apply.
24
- # @return [GOBL::Org::Key]
25
- property :rate, GOBL::Org::Key
24
+ # @return [GOBL::CBC::Key]
25
+ property :rate, GOBL::CBC::Key
26
26
 
27
27
  # @!attribute [r] percent
28
28
  # Percent defines the percentage set manually or determined from the rate key (calculated if rate present).
@@ -3,15 +3,15 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
10
- module Org
11
- # TaxIdentity stores the details required to identify an entity for tax purposes.
12
- class TaxIdentity < GOBL::Object
13
- # The Schema ID of the GOBL TaxIdentity structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/org/tax-identity'
10
+ module Tax
11
+ # Identity stores the details required to identify an entity for tax purposes.
12
+ class Identity < GOBL::Object
13
+ # The Schema ID of the GOBL Identity structure
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity'
15
15
 
16
16
  # @!attribute [r] uuid
17
17
  # Unique universal identity code for this tax identity.
@@ -24,10 +24,10 @@ module GOBL
24
24
  property :country, GOBL::L10n::CountryCode
25
25
  validates :country, presence: true
26
26
 
27
- # @!attribute [r] locality
28
- # Where inside a country the identity holder is based for tax purposes, like a city, county, province, state, or combination of various.
27
+ # @!attribute [r] zone
28
+ # Where inside the country the tax identity holder is based for tax purposes like a village, town, district, city, county, state or province. For some areas, this could be a regular post or zip code. See the regime packages for specific validation rules.
29
29
  # @return [GOBL::L10n::Code]
30
- property :locality, GOBL::L10n::Code
30
+ property :zone, GOBL::L10n::Code
31
31
 
32
32
  # @!attribute [r] source
33
33
  # What is the source document of the tax identity.
@@ -41,8 +41,8 @@ module GOBL
41
41
 
42
42
  # @!attribute [r] meta
43
43
  # Additional details that may be required.
44
- # @return [GOBL::Org::Meta]
45
- property :meta, GOBL::Org::Meta
44
+ # @return [GOBL::CBC::Meta]
45
+ property :meta, GOBL::CBC::Meta
46
46
  end
47
47
  end
48
48
  end
data/lib/gobl/tax/rate.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -11,12 +11,12 @@ module GOBL
11
11
  # Rate defines a single rate inside a category
12
12
  class Rate < GOBL::Object
13
13
  # The Schema ID of the GOBL Rate structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/tax/region#/$defs/Rate'
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Rate'
15
15
 
16
16
  # @!attribute [r] key
17
17
  # Key identifies this rate within the system
18
- # @return [GOBL::Org::Key]
19
- property :key, GOBL::Org::Key
18
+ # @return [GOBL::CBC::Key]
19
+ property :key, GOBL::CBC::Key
20
20
  validates :key, presence: true
21
21
 
22
22
  # @!attribute [r] name
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -14,8 +14,8 @@ module GOBL
14
14
  SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/RateTotal'
15
15
 
16
16
  # @!attribute [r] key
17
- # @return [GOBL::Org::Key]
18
- property :key, GOBL::Org::Key
17
+ # @return [GOBL::CBC::Key]
18
+ property :key, GOBL::CBC::Key
19
19
 
20
20
  # @!attribute [r] base
21
21
  # @return [GOBL::Num::Amount]
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
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.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -11,7 +11,7 @@ module GOBL
11
11
  # RateValue contains a percentage rate or fixed amount for a given date range.
12
12
  class RateValue < GOBL::Object
13
13
  # The Schema ID of the GOBL RateValue structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/tax/region#/$defs/RateValue'
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/RateValue'
15
15
 
16
16
  # @!attribute [r] since
17
17
  # Date from which this value should be applied.
@@ -3,18 +3,18 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
10
10
  module Tax
11
- # Region defines the holding structure for a regions categories and subsequent Rates and Values.
12
- class Region < GOBL::Object
13
- # The Schema ID of the GOBL Region structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/tax/region'
11
+ # Regime defines the holding structure for the definitions of taxes inside a country or territory.
12
+ class Regime < GOBL::Object
13
+ # The Schema ID of the GOBL Regime structure
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime'
15
15
 
16
16
  # @!attribute [r] name
17
- # Name of the region
17
+ # Name of the country
18
18
  # @return [GOBL::I18n::String]
19
19
  property :name, GOBL::I18n::String
20
20
  validates :name, presence: true
@@ -25,18 +25,18 @@ module GOBL
25
25
  property :country, GOBL::L10n::CountryCode
26
26
  validates :country, presence: true
27
27
 
28
- # @!attribute [r] locality
29
- # Locality, city, province, county, or similar code inside the country, if needed.
28
+ # @!attribute [r] zone
29
+ # Specific Locality, region, city, province, county, or similar code inside the country, if needed.
30
30
  # @return [GOBL::L10n::Code]
31
- property :locality, GOBL::L10n::Code
31
+ property :zone, GOBL::L10n::Code
32
32
 
33
- # @!attribute [r] localities
34
- # List of sub-localities inside a region.
35
- # @return [Array<Locality>]
36
- property :localities, [Locality]
33
+ # @!attribute [r] zones
34
+ # List of sub-zones inside a country.
35
+ # @return [Array<Zone>]
36
+ property :zones, [Zone]
37
37
 
38
38
  # @!attribute [r] currency
39
- # Currency used by the region for tax purposes.
39
+ # Currency used by the country.
40
40
  # @return [GOBL::Currency::Code]
41
41
  property :currency, GOBL::Currency::Code
42
42
  validates :currency, presence: true
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -11,12 +11,12 @@ module GOBL
11
11
  # Scheme contains the definition of a scheme that belongs to a region and can be used to simplify validation processes for document contents.
12
12
  class Scheme < GOBL::Object
13
13
  # The Schema ID of the GOBL Scheme structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/tax/region#/$defs/Scheme'
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Scheme'
15
15
 
16
16
  # @!attribute [r] key
17
17
  # Key used to identify this scheme
18
- # @return [GOBL::Org::Key]
19
- property :key, GOBL::Org::Key
18
+ # @return [GOBL::CBC::Key]
19
+ property :key, GOBL::CBC::Key
20
20
  validates :key, presence: true
21
21
 
22
22
  # @!attribute [r] name
@@ -32,13 +32,13 @@ module GOBL
32
32
 
33
33
  # @!attribute [r] categories
34
34
  # List of tax category codes that can be used when this scheme is applied.
35
- # @return [Array<GOBL::Org::Code>]
36
- property :categories, [GOBL::Org::Code]
35
+ # @return [Array<GOBL::CBC::Code>]
36
+ property :categories, [GOBL::CBC::Code]
37
37
 
38
38
  # @!attribute [r] note
39
39
  # Note defines a message that should be added to a document when this scheme is used.
40
- # @return [GOBL::Org::Note]
41
- property :note, GOBL::Org::Note
40
+ # @return [GOBL::CBC::Note]
41
+ property :note, GOBL::CBC::Note
42
42
  end
43
43
  end
44
44
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/tax/set.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -3,15 +3,15 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
10
- module Org
10
+ module Tax
11
11
  # SourceKey identifies the source of a tax identity
12
12
  class SourceKey < GOBL::Enum
13
13
  # The Schema ID of the GOBL SourceKey structure
14
- SCHEMA_ID = 'https://gobl.org/draft-0/org/tax-identity#/$defs/SourceKey'
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity#/$defs/SourceKey'
15
15
 
16
16
  # The enumeration of values of the object and their descriptions (Values different to these are not allowed)
17
17
  ENUM = {
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.32.0
6
+ ## Generated with GOBL v0.34.1
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -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.34.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Tax
11
+ # Zone represents an area inside a country, like a province or a state, which shares the basic definitions of the country, but may vary in some validation rules.
12
+ class Zone < GOBL::Object
13
+ # The Schema ID of the GOBL Zone structure
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Zone'
15
+
16
+ # @!attribute [r] code
17
+ # Unique zone code.
18
+ # @return [GOBL::L10n::Code]
19
+ property :code, GOBL::L10n::Code
20
+ validates :code, presence: true
21
+
22
+ # @!attribute [r] name
23
+ # Name of the zone to be use if a locality or region is not applicable.
24
+ # @return [GOBL::I18n::String]
25
+ property :name, GOBL::I18n::String
26
+
27
+ # @!attribute [r] locality
28
+ # Village, town, district, or city name which should coincide with address data.
29
+ # @return [GOBL::I18n::String]
30
+ property :locality, GOBL::I18n::String
31
+
32
+ # @!attribute [r] region
33
+ # Province, county, or state which should match address data.
34
+ # @return [GOBL::I18n::String]
35
+ property :region, GOBL::I18n::String
36
+
37
+ # @!attribute [r] meta
38
+ # Any additional information
39
+ # @return [GOBL::CBC::Meta]
40
+ property :meta, GOBL::CBC::Meta
41
+ end
42
+ end
43
+ end