gobl 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -13
  3. data/data/regimes/es.json +55 -3
  4. data/data/regimes/it.json +1707 -0
  5. data/data/regimes/pt.json +272 -7
  6. data/lib/{gobl → generated/gobl}/bill/charge.rb +1 -1
  7. data/lib/{gobl → generated/gobl}/bill/delivery.rb +1 -1
  8. data/lib/{gobl → generated/gobl}/bill/discount.rb +1 -1
  9. data/lib/{gobl → generated/gobl}/bill/document_reference.rb +1 -1
  10. data/lib/{gobl → generated/gobl}/bill/invoice.rb +1 -1
  11. data/lib/{gobl → generated/gobl}/bill/line.rb +1 -1
  12. data/lib/{gobl → generated/gobl}/bill/line_charge.rb +1 -1
  13. data/lib/{gobl → generated/gobl}/bill/line_discount.rb +1 -1
  14. data/lib/{gobl → generated/gobl}/bill/ordering.rb +1 -1
  15. data/lib/{gobl → generated/gobl}/bill/outlay.rb +1 -1
  16. data/lib/{gobl → generated/gobl}/bill/payment.rb +1 -1
  17. data/lib/{gobl → generated/gobl}/bill/preceding.rb +1 -2
  18. data/lib/{gobl → generated/gobl}/bill/tax.rb +1 -1
  19. data/lib/{gobl → generated/gobl}/bill/totals.rb +1 -1
  20. data/lib/{gobl → generated/gobl}/cal/date.rb +1 -1
  21. data/lib/{gobl → generated/gobl}/cal/period.rb +1 -1
  22. data/lib/{gobl → generated/gobl}/cbc/code.rb +1 -1
  23. data/lib/{gobl → generated/gobl}/cbc/key.rb +1 -1
  24. data/lib/{gobl → generated/gobl}/cbc/meta.rb +1 -1
  25. data/lib/generated/gobl/cbc/note.rb +68 -0
  26. data/lib/{gobl → generated/gobl}/cbc/stamp.rb +1 -1
  27. data/lib/{gobl → generated/gobl}/currency/code.rb +1 -1
  28. data/lib/{gobl → generated/gobl}/currency/exchange_rate.rb +1 -1
  29. data/lib/{gobl → generated/gobl}/document.rb +2 -2
  30. data/lib/{gobl → generated/gobl}/dsig/digest.rb +1 -1
  31. data/lib/{gobl → generated/gobl}/dsig/signature.rb +1 -1
  32. data/lib/{gobl → generated/gobl}/envelope.rb +1 -1
  33. data/lib/{gobl → generated/gobl}/header.rb +1 -1
  34. data/lib/{gobl → generated/gobl}/i18n/string.rb +1 -1
  35. data/lib/{gobl → generated/gobl}/l10n/code.rb +1 -1
  36. data/lib/{gobl → generated/gobl}/l10n/country_code.rb +1 -1
  37. data/lib/{gobl → generated/gobl}/note/message.rb +1 -1
  38. data/lib/{gobl → generated/gobl}/org/address.rb +1 -1
  39. data/lib/{gobl → generated/gobl}/org/coordinates.rb +1 -1
  40. data/lib/{gobl → generated/gobl}/org/email.rb +1 -1
  41. data/lib/{gobl → generated/gobl}/org/identity.rb +1 -1
  42. data/lib/{gobl → generated/gobl}/org/image.rb +1 -1
  43. data/lib/{gobl → generated/gobl}/org/inbox.rb +1 -1
  44. data/lib/{gobl → generated/gobl}/org/item.rb +1 -1
  45. data/lib/{gobl → generated/gobl}/org/name.rb +1 -1
  46. data/lib/{gobl → generated/gobl}/org/party.rb +1 -1
  47. data/lib/{gobl → generated/gobl}/org/person.rb +1 -1
  48. data/lib/{gobl → generated/gobl}/org/registration.rb +1 -1
  49. data/lib/{gobl → generated/gobl}/org/telephone.rb +1 -1
  50. data/lib/{gobl → generated/gobl}/org/unit.rb +1 -1
  51. data/lib/{gobl → generated/gobl}/org/website.rb +1 -1
  52. data/lib/{gobl → generated/gobl}/pay/advance.rb +1 -1
  53. data/lib/{gobl → generated/gobl}/pay/card.rb +1 -1
  54. data/lib/{gobl → generated/gobl}/pay/credit_transfer.rb +1 -1
  55. data/lib/{gobl → generated/gobl}/pay/direct_debit.rb +1 -1
  56. data/lib/{gobl → generated/gobl}/pay/due_date.rb +1 -1
  57. data/lib/{gobl → generated/gobl}/pay/instructions.rb +1 -1
  58. data/lib/{gobl → generated/gobl}/pay/online.rb +1 -1
  59. data/lib/{gobl → generated/gobl}/pay/terms.rb +1 -1
  60. data/lib/{gobl → generated/gobl}/tax/category.rb +1 -1
  61. data/lib/{gobl → generated/gobl}/tax/category_total.rb +1 -1
  62. data/lib/{gobl → generated/gobl}/tax/combo.rb +1 -1
  63. data/lib/{gobl → generated/gobl}/tax/identity.rb +4 -14
  64. data/lib/generated/gobl/tax/identity_type.rb +33 -0
  65. data/lib/{gobl → generated/gobl}/tax/key_definition.rb +1 -1
  66. data/lib/{gobl → generated/gobl}/tax/preceding_definitions.rb +1 -1
  67. data/lib/{gobl → generated/gobl}/tax/rate.rb +1 -1
  68. data/lib/{gobl → generated/gobl}/tax/rate_total.rb +1 -1
  69. data/lib/{gobl → generated/gobl}/tax/rate_total_surcharge.rb +1 -1
  70. data/lib/{gobl → generated/gobl}/tax/rate_value.rb +1 -1
  71. data/lib/{gobl → generated/gobl}/tax/regime.rb +6 -1
  72. data/lib/{gobl → generated/gobl}/tax/scenario.rb +1 -1
  73. data/lib/{gobl → generated/gobl}/tax/scenario_set.rb +1 -1
  74. data/lib/{gobl → generated/gobl}/tax/set.rb +1 -1
  75. data/lib/{gobl → generated/gobl}/tax/tag.rb +1 -1
  76. data/lib/{gobl → generated/gobl}/tax/total.rb +1 -1
  77. data/lib/{gobl → generated/gobl}/tax/zone.rb +1 -1
  78. data/lib/{gobl → generated/gobl}/uuid/uuid.rb +1 -1
  79. data/lib/gobl/version.rb +1 -1
  80. data/lib/gobl.rb +1 -0
  81. metadata +75 -74
  82. data/lib/gobl/cbc/note.rb +0 -38
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -29,20 +29,10 @@ module GOBL
29
29
  # @return [GOBL::L10n::Code]
30
30
  property :zone, GOBL::L10n::Code
31
31
 
32
- # Enumeration of possible values for {#source} with their corresponding descriptions
33
- SOURCE_ENUM = {
34
- 'tax-agency' => 'Sourced directly from a tax agency',
35
- 'passport' => 'A passport document',
36
- 'national' => 'National ID Card or similar',
37
- 'permit' => 'Residential or similar permit',
38
- 'other' => 'An other type of source not listed'
39
- }.freeze
40
-
41
- # @!attribute [r] source
42
- # What is the source document of the tax identity.
32
+ # @!attribute [r] type
33
+ # Type is set according the requirements of each regime, some have a single tax document type code, others require a choice to be made.
43
34
  # @return [GOBL::CBC::Key]
44
- property :source, GOBL::CBC::Key
45
- validates_inclusion_of :source, in: SOURCE_ENUM.keys, allow_blank: true
35
+ property :type, GOBL::CBC::Key
46
36
 
47
37
  # @!attribute [r] code
48
38
  # Normalized code shown on the original identity document.
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ ## DO NOT EDIT - This file was generated automatically.
5
+ ##
6
+ ## Generated with GOBL v0.39.0
7
+ ##
8
+
9
+ module GOBL
10
+ module Tax
11
+ # IdentityType describes a single possible value for a tax identity type.
12
+ class IdentityType < GOBL::Object
13
+ # The Schema ID of the GOBL IdentityType structure
14
+ SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/IdentityType'
15
+
16
+ # @!attribute [r] key
17
+ # Key used to identify the type
18
+ # @return [GOBL::CBC::Key]
19
+ property :key, GOBL::CBC::Key
20
+ validates_presence_of :key
21
+
22
+ # @!attribute [r] name
23
+ # Name for the identity type
24
+ # @return [GOBL::I18n::String]
25
+ property :name, GOBL::I18n::String
26
+
27
+ # @!attribute [r] meta
28
+ # Additional regime specific meta data
29
+ # @return [GOBL::CBC::Meta]
30
+ property :meta, GOBL::CBC::Meta
31
+ end
32
+ end
33
+ end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -41,6 +41,11 @@ module GOBL
41
41
  property :currency, GOBL::Currency::Code
42
42
  validates_presence_of :currency
43
43
 
44
+ # @!attribute [r] identity_types
45
+ # Identity types specific for the regime and may be validated against.
46
+ # @return [Array<IdentityType>]
47
+ property :identity_types, [IdentityType]
48
+
44
49
  # @!attribute [r] tags
45
50
  # Tags that can be applied at the document level to identify additional considerations.
46
51
  # @return [Array<Tag>]
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.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.38.0
6
+ ## Generated with GOBL v0.39.0
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GOBL
4
- VERSION = '0.10.0'
4
+ VERSION = '0.11.0'
5
5
  end
data/lib/gobl.rb CHANGED
@@ -9,6 +9,7 @@ require 'base64'
9
9
  require 'hashme'
10
10
 
11
11
  loader = Zeitwerk::Loader.for_gem
12
+ loader.push_dir("#{__dir__}/generated")
12
13
  loader.inflector.inflect(
13
14
  'gobl' => 'GOBL',
14
15
  'uuid' => 'UUID',