gobl 0.7.3 → 0.9.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/data/regimes/pt.json +234 -0
  3. data/lib/gobl/bill/charge.rb +1 -1
  4. data/lib/gobl/bill/delivery.rb +3 -3
  5. data/lib/gobl/bill/discount.rb +1 -1
  6. data/lib/gobl/bill/document_reference.rb +37 -0
  7. data/lib/gobl/bill/invoice.rb +11 -8
  8. data/lib/gobl/bill/invoice_type.rb +2 -4
  9. data/lib/gobl/bill/line.rb +1 -1
  10. data/lib/gobl/bill/line_charge.rb +1 -1
  11. data/lib/gobl/bill/line_discount.rb +1 -1
  12. data/lib/gobl/bill/ordering.rb +48 -3
  13. data/lib/gobl/bill/outlay.rb +1 -1
  14. data/lib/gobl/bill/payment.rb +6 -6
  15. data/lib/gobl/bill/preceding.rb +1 -1
  16. data/lib/gobl/bill/tax.rb +3 -3
  17. data/lib/gobl/bill/totals.rb +1 -1
  18. data/lib/gobl/cal/date.rb +1 -1
  19. data/lib/gobl/cal/period.rb +1 -1
  20. data/lib/gobl/cbc/code.rb +1 -1
  21. data/lib/gobl/cbc/key.rb +1 -1
  22. data/lib/gobl/cbc/meta.rb +1 -1
  23. data/lib/gobl/cbc/note.rb +1 -1
  24. data/lib/gobl/cbc/note_key.rb +2 -4
  25. data/lib/gobl/cbc/stamp.rb +1 -1
  26. data/lib/gobl/currency/code.rb +2 -4
  27. data/lib/gobl/currency/exchange_rate.rb +1 -1
  28. data/lib/gobl/document.rb +1 -1
  29. data/lib/gobl/dsig/digest.rb +1 -1
  30. data/lib/gobl/dsig/signature.rb +1 -1
  31. data/lib/gobl/enum.rb +2 -12
  32. data/lib/gobl/envelope.rb +1 -1
  33. data/lib/gobl/header.rb +1 -1
  34. data/lib/gobl/i18n/string.rb +1 -1
  35. data/lib/gobl/l10n/code.rb +1 -1
  36. data/lib/gobl/l10n/country_code.rb +2 -4
  37. data/lib/gobl/note/message.rb +1 -1
  38. data/lib/gobl/org/address.rb +1 -1
  39. data/lib/gobl/org/coordinates.rb +1 -1
  40. data/lib/gobl/org/email.rb +1 -1
  41. data/lib/gobl/org/image.rb +67 -0
  42. data/lib/gobl/org/inbox.rb +1 -1
  43. data/lib/gobl/org/item.rb +1 -1
  44. data/lib/gobl/org/item_code.rb +1 -1
  45. data/lib/gobl/org/name.rb +1 -1
  46. data/lib/gobl/org/party.rb +11 -1
  47. data/lib/gobl/org/person.rb +6 -1
  48. data/lib/gobl/org/registration.rb +1 -1
  49. data/lib/gobl/org/telephone.rb +1 -1
  50. data/lib/gobl/org/unit.rb +1 -1
  51. data/lib/gobl/org/website.rb +38 -0
  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 +2 -2
  58. data/lib/gobl/pay/method_key.rb +4 -6
  59. data/lib/gobl/pay/online.rb +1 -1
  60. data/lib/gobl/pay/term_key.rb +2 -4
  61. data/lib/gobl/pay/terms.rb +1 -1
  62. data/lib/gobl/tax/category.rb +1 -1
  63. data/lib/gobl/tax/category_total.rb +1 -1
  64. data/lib/gobl/tax/combo.rb +1 -1
  65. data/lib/gobl/tax/identity.rb +1 -1
  66. data/lib/gobl/tax/rate.rb +2 -2
  67. data/lib/gobl/tax/rate_total.rb +1 -1
  68. data/lib/gobl/tax/rate_total_surcharge.rb +1 -1
  69. data/lib/gobl/tax/rate_value.rb +6 -1
  70. data/lib/gobl/tax/regime.rb +3 -3
  71. data/lib/gobl/tax/scheme.rb +1 -1
  72. data/lib/gobl/tax/set.rb +1 -1
  73. data/lib/gobl/tax/source_key.rb +2 -4
  74. data/lib/gobl/tax/total.rb +1 -1
  75. data/lib/gobl/tax/zone.rb +1 -1
  76. data/lib/gobl/uuid/uuid.rb +1 -1
  77. data/lib/gobl/version.rb +1 -1
  78. metadata +7 -7
  79. data/lib/gobl/bill/advances.rb +0 -14
  80. data/lib/gobl/bill/exchange_rates.rb +0 -14
  81. data/lib/gobl/bill/scheme_keys.rb +0 -14
  82. data/lib/gobl/tax/schemes.rb +0 -14
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.34.1
6
+ ## Generated with GOBL v0.36.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -43,8 +43,8 @@ module GOBL
43
43
 
44
44
  # @!attribute [r] schemes
45
45
  # Set of specific scheme definitions inside the region.
46
- # @return [Schemes]
47
- property :schemes, Schemes
46
+ # @return [Array<Scheme>]
47
+ property :schemes, [Scheme]
48
48
 
49
49
  # @!attribute [r] categories
50
50
  # List of tax categories.
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.34.1
6
+ ## Generated with GOBL v0.36.0
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.34.1
6
+ ## Generated with GOBL v0.36.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.34.1
6
+ ## Generated with GOBL v0.36.0
7
7
  ##
8
8
 
9
9
  module GOBL
@@ -22,9 +22,7 @@ module GOBL
22
22
  'other' => 'An other type of source not listed'
23
23
  }.freeze
24
24
 
25
- def strict_enum?
26
- true
27
- end
25
+ validates_inclusion_of :_value, in: ENUM.keys, message: '"%{value}" is not within the allowed values of the enumeration'
28
26
  end
29
27
  end
30
28
  end
@@ -3,7 +3,7 @@
3
3
  ##
4
4
  ## DO NOT EDIT - This file was generated automatically.
5
5
  ##
6
- ## Generated with GOBL v0.34.1
6
+ ## Generated with GOBL v0.36.0
7
7
  ##
8
8
 
9
9
  module GOBL
data/lib/gobl/tax/zone.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.34.0
6
+ ## Generated with GOBL v0.36.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.34.1
6
+ ## Generated with GOBL v0.36.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.7.3'
4
+ VERSION = '0.9.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.7.3
4
+ version: 0.9.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-01-27 00:00:00.000000000 Z
13
+ date: 2023-03-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -66,12 +66,12 @@ files:
66
66
  - data/regimes/fr.json
67
67
  - data/regimes/gb.json
68
68
  - data/regimes/nl.json
69
+ - data/regimes/pt.json
69
70
  - lib/gobl.rb
70
- - lib/gobl/bill/advances.rb
71
71
  - lib/gobl/bill/charge.rb
72
72
  - lib/gobl/bill/delivery.rb
73
73
  - lib/gobl/bill/discount.rb
74
- - lib/gobl/bill/exchange_rates.rb
74
+ - lib/gobl/bill/document_reference.rb
75
75
  - lib/gobl/bill/invoice.rb
76
76
  - lib/gobl/bill/invoice_type.rb
77
77
  - lib/gobl/bill/line.rb
@@ -81,7 +81,6 @@ files:
81
81
  - lib/gobl/bill/outlay.rb
82
82
  - lib/gobl/bill/payment.rb
83
83
  - lib/gobl/bill/preceding.rb
84
- - lib/gobl/bill/scheme_keys.rb
85
84
  - lib/gobl/bill/tax.rb
86
85
  - lib/gobl/bill/totals.rb
87
86
  - lib/gobl/cal/date.rb
@@ -120,6 +119,7 @@ files:
120
119
  - lib/gobl/org/address.rb
121
120
  - lib/gobl/org/coordinates.rb
122
121
  - lib/gobl/org/email.rb
122
+ - lib/gobl/org/image.rb
123
123
  - lib/gobl/org/inbox.rb
124
124
  - lib/gobl/org/item.rb
125
125
  - lib/gobl/org/item_code.rb
@@ -129,6 +129,7 @@ files:
129
129
  - lib/gobl/org/registration.rb
130
130
  - lib/gobl/org/telephone.rb
131
131
  - lib/gobl/org/unit.rb
132
+ - lib/gobl/org/website.rb
132
133
  - lib/gobl/pay/advance.rb
133
134
  - lib/gobl/pay/card.rb
134
135
  - lib/gobl/pay/credit_transfer.rb
@@ -150,7 +151,6 @@ files:
150
151
  - lib/gobl/tax/rate_value.rb
151
152
  - lib/gobl/tax/regime.rb
152
153
  - lib/gobl/tax/scheme.rb
153
- - lib/gobl/tax/schemes.rb
154
154
  - lib/gobl/tax/set.rb
155
155
  - lib/gobl/tax/source_key.rb
156
156
  - lib/gobl/tax/total.rb
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: 3.1.4
180
180
  requirements: []
181
- rubygems_version: 3.4.1
181
+ rubygems_version: 3.4.6
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Minimalist ruby version of the GOBL library
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ##
4
- ## DO NOT EDIT - This file was generated automatically.
5
- ##
6
- ## Generated with GOBL v0.34.1
7
- ##
8
-
9
- module GOBL
10
- module Bill
11
- # Advances contains an array of advance objects.
12
- Advances = [GOBL::Pay::Advance] # rubocop:disable Naming/ConstantName, Style/MutableConstant
13
- end
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ##
4
- ## DO NOT EDIT - This file was generated automatically.
5
- ##
6
- ## Generated with GOBL v0.34.1
7
- ##
8
-
9
- module GOBL
10
- module Bill
11
- # ExchangeRates represents an array of currency exchange rates.
12
- ExchangeRates = [GOBL::Currency::ExchangeRate] # rubocop:disable Naming/ConstantName, Style/MutableConstant
13
- end
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ##
4
- ## DO NOT EDIT - This file was generated automatically.
5
- ##
6
- ## Generated with GOBL v0.34.1
7
- ##
8
-
9
- module GOBL
10
- module Bill
11
- # SchemeKeys stores a list of keys that makes it easier to perform matches.
12
- SchemeKeys = [GOBL::CBC::Key] # rubocop:disable Naming/ConstantName, Style/MutableConstant
13
- end
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ##
4
- ## DO NOT EDIT - This file was generated automatically.
5
- ##
6
- ## Generated with GOBL v0.34.1
7
- ##
8
-
9
- module GOBL
10
- module Tax
11
- # Schemes defines an array of scheme objects with helper functions.
12
- Schemes = [Scheme] # rubocop:disable Naming/ConstantName, Style/MutableConstant
13
- end
14
- end