gobl 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/data/regimes/es.json +55 -3
  3. data/data/regimes/it.json +1707 -0
  4. data/data/regimes/pt.json +272 -7
  5. data/lib/generated/gobl/bill/charge.rb +1 -1
  6. data/lib/generated/gobl/bill/delivery.rb +1 -1
  7. data/lib/generated/gobl/bill/discount.rb +1 -1
  8. data/lib/generated/gobl/bill/document_reference.rb +1 -1
  9. data/lib/generated/gobl/bill/invoice.rb +1 -1
  10. data/lib/generated/gobl/bill/line.rb +1 -1
  11. data/lib/generated/gobl/bill/line_charge.rb +1 -1
  12. data/lib/generated/gobl/bill/line_discount.rb +1 -1
  13. data/lib/generated/gobl/bill/ordering.rb +1 -1
  14. data/lib/generated/gobl/bill/outlay.rb +1 -1
  15. data/lib/generated/gobl/bill/payment.rb +1 -1
  16. data/lib/generated/gobl/bill/preceding.rb +1 -2
  17. data/lib/generated/gobl/bill/tax.rb +1 -1
  18. data/lib/generated/gobl/bill/totals.rb +1 -1
  19. data/lib/generated/gobl/cal/date.rb +1 -1
  20. data/lib/generated/gobl/cal/period.rb +1 -1
  21. data/lib/generated/gobl/cbc/code.rb +1 -1
  22. data/lib/generated/gobl/cbc/key.rb +1 -1
  23. data/lib/generated/gobl/cbc/meta.rb +1 -1
  24. data/lib/generated/gobl/cbc/note.rb +31 -1
  25. data/lib/generated/gobl/cbc/stamp.rb +1 -1
  26. data/lib/generated/gobl/currency/code.rb +1 -1
  27. data/lib/generated/gobl/currency/exchange_rate.rb +1 -1
  28. data/lib/generated/gobl/document.rb +2 -2
  29. data/lib/generated/gobl/dsig/digest.rb +1 -1
  30. data/lib/generated/gobl/dsig/signature.rb +1 -1
  31. data/lib/generated/gobl/envelope.rb +1 -1
  32. data/lib/generated/gobl/header.rb +1 -1
  33. data/lib/generated/gobl/i18n/string.rb +1 -1
  34. data/lib/generated/gobl/l10n/code.rb +1 -1
  35. data/lib/generated/gobl/l10n/country_code.rb +1 -1
  36. data/lib/generated/gobl/note/message.rb +1 -1
  37. data/lib/generated/gobl/org/address.rb +1 -1
  38. data/lib/generated/gobl/org/coordinates.rb +1 -1
  39. data/lib/generated/gobl/org/email.rb +1 -1
  40. data/lib/generated/gobl/org/identity.rb +1 -1
  41. data/lib/generated/gobl/org/image.rb +1 -1
  42. data/lib/generated/gobl/org/inbox.rb +1 -1
  43. data/lib/generated/gobl/org/item.rb +1 -1
  44. data/lib/generated/gobl/org/name.rb +1 -1
  45. data/lib/generated/gobl/org/party.rb +1 -1
  46. data/lib/generated/gobl/org/person.rb +1 -1
  47. data/lib/generated/gobl/org/registration.rb +1 -1
  48. data/lib/generated/gobl/org/telephone.rb +1 -1
  49. data/lib/generated/gobl/org/unit.rb +1 -1
  50. data/lib/generated/gobl/org/website.rb +1 -1
  51. data/lib/generated/gobl/pay/advance.rb +1 -1
  52. data/lib/generated/gobl/pay/card.rb +1 -1
  53. data/lib/generated/gobl/pay/credit_transfer.rb +1 -1
  54. data/lib/generated/gobl/pay/direct_debit.rb +1 -1
  55. data/lib/generated/gobl/pay/due_date.rb +1 -1
  56. data/lib/generated/gobl/pay/instructions.rb +1 -1
  57. data/lib/generated/gobl/pay/online.rb +1 -1
  58. data/lib/generated/gobl/pay/terms.rb +1 -1
  59. data/lib/generated/gobl/tax/category.rb +1 -1
  60. data/lib/generated/gobl/tax/category_total.rb +1 -1
  61. data/lib/generated/gobl/tax/combo.rb +1 -1
  62. data/lib/generated/gobl/tax/identity.rb +4 -14
  63. data/lib/generated/gobl/tax/identity_type.rb +33 -0
  64. data/lib/generated/gobl/tax/key_definition.rb +1 -1
  65. data/lib/generated/gobl/tax/preceding_definitions.rb +1 -1
  66. data/lib/generated/gobl/tax/rate.rb +1 -1
  67. data/lib/generated/gobl/tax/rate_total.rb +1 -1
  68. data/lib/generated/gobl/tax/rate_total_surcharge.rb +1 -1
  69. data/lib/generated/gobl/tax/rate_value.rb +1 -1
  70. data/lib/generated/gobl/tax/regime.rb +6 -1
  71. data/lib/generated/gobl/tax/scenario.rb +1 -1
  72. data/lib/generated/gobl/tax/scenario_set.rb +1 -1
  73. data/lib/generated/gobl/tax/set.rb +1 -1
  74. data/lib/generated/gobl/tax/tag.rb +1 -1
  75. data/lib/generated/gobl/tax/total.rb +1 -1
  76. data/lib/generated/gobl/tax/zone.rb +1 -1
  77. data/lib/generated/gobl/uuid/uuid.rb +1 -1
  78. data/lib/gobl/version.rb +1 -1
  79. metadata +3 -2
@@ -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.1'
4
+ VERSION = '0.11.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Lilue
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-03-17 00:00:00.000000000 Z
13
+ date: 2023-03-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -126,6 +126,7 @@ files:
126
126
  - lib/generated/gobl/tax/category_total.rb
127
127
  - lib/generated/gobl/tax/combo.rb
128
128
  - lib/generated/gobl/tax/identity.rb
129
+ - lib/generated/gobl/tax/identity_type.rb
129
130
  - lib/generated/gobl/tax/key_definition.rb
130
131
  - lib/generated/gobl/tax/preceding_definitions.rb
131
132
  - lib/generated/gobl/tax/rate.rb