e-invoice-api 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +2 -2
- data/lib/e_invoice_api/models/allowance.rb +42 -14
- data/lib/e_invoice_api/models/charge.rb +193 -4
- data/lib/e_invoice_api/models/document_create.rb +721 -120
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +123 -58
- data/lib/e_invoice_api/models/document_response.rb +373 -80
- data/lib/e_invoice_api/models/me_retrieve_response.rb +21 -7
- data/lib/e_invoice_api/models/payment_detail_create.rb +15 -4
- data/lib/e_invoice_api/resources/documents.rb +42 -38
- data/lib/e_invoice_api/resources/validate.rb +42 -38
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/allowance.rbi +81 -21
- data/rbi/e_invoice_api/models/charge.rbi +202 -5
- data/rbi/e_invoice_api/models/document_create.rbi +3085 -702
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +136 -30
- data/rbi/e_invoice_api/models/document_response.rbi +1232 -58
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +20 -6
- data/rbi/e_invoice_api/models/payment_detail_create.rbi +10 -0
- data/rbi/e_invoice_api/resources/documents.rbi +51 -10
- data/rbi/e_invoice_api/resources/validate.rbi +51 -10
- data/sig/e_invoice_api/models/allowance.rbs +59 -8
- data/sig/e_invoice_api/models/charge.rbs +369 -4
- data/sig/e_invoice_api/models/document_create.rbs +939 -44
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +15 -0
- data/sig/e_invoice_api/models/document_response.rbs +443 -12
- data/sig/e_invoice_api/models/me_retrieve_response.rbs +5 -0
- data/sig/e_invoice_api/resources/documents.rbs +2 -0
- data/sig/e_invoice_api/resources/validate.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a79db46acae2d1c0f7f3f458f41462b8c899db697b94c9816381981b29ab23b9
|
|
4
|
+
data.tar.gz: 7870174be3777be93aa109c507d78aaaa79549a4ccf4aba07f7c9bdf2d4d38bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c2f9354c666594f91ba405cb5a4fdd5aa4185e0af1086111697c25aa3ee75a9d1fc06330b4d368f9954a075b9870a804226bbe32fed346677e4a41d407ffff5
|
|
7
|
+
data.tar.gz: f6da9851d8d076267fd9d99c54e5ab80c2e1dc0c39e98227d0beab0af02db26537688f56b0fd5c822b5231bca1c6e03f7fb80fda3facf1aaaf2a0230f75adfea
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2025-11-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.11.0...v0.12.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([9fdde80](https://github.com/e-invoice-be/e-invoice-rb/commit/9fdde803109f66b3dd5601430345ab5334565650))
|
|
10
|
+
* **api:** api update ([b81b8e8](https://github.com/e-invoice-be/e-invoice-rb/commit/b81b8e8361d82229d444102e37eff951a8989e29))
|
|
11
|
+
|
|
3
12
|
## 0.11.0 (2025-11-06)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v0.10.1...v0.11.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.10.1...v0.11.0)
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
17
17
|
<!-- x-release-please-start-version -->
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem "e-invoice-api", "~> 0.
|
|
20
|
+
gem "e-invoice-api", "~> 0.12.0"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -83,7 +83,7 @@ file =
|
|
|
83
83
|
EInvoiceAPI::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "…")
|
|
84
84
|
response = e_invoice.documents.create_from_pdf(file: file)
|
|
85
85
|
|
|
86
|
-
puts(response.
|
|
86
|
+
puts(response.customer_company_id)
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Note that you can also pass a raw `IO` descriptor, but this disables retries, as the library can't be sure if the descriptor is a file or pipe (which cannot be rewound).
|
|
@@ -18,7 +18,8 @@ module EInvoiceAPI
|
|
|
18
18
|
|
|
19
19
|
# @!attribute multiplier_factor
|
|
20
20
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
21
|
-
# to calculate the allowance amount. To state 20%, use value 20
|
|
21
|
+
# to calculate the allowance amount. To state 20%, use value 20. Must be rounded
|
|
22
|
+
# to maximum 2 decimals
|
|
22
23
|
#
|
|
23
24
|
# @return [String, nil]
|
|
24
25
|
optional :multiplier_factor, String, nil?: true
|
|
@@ -30,21 +31,20 @@ module EInvoiceAPI
|
|
|
30
31
|
optional :reason, String, nil?: true
|
|
31
32
|
|
|
32
33
|
# @!attribute reason_code
|
|
33
|
-
#
|
|
34
|
+
# Allowance reason codes for invoice discounts and charges
|
|
34
35
|
#
|
|
35
|
-
# @return [
|
|
36
|
-
optional :reason_code,
|
|
36
|
+
# @return [Symbol, EInvoiceAPI::Models::Allowance::ReasonCode, nil]
|
|
37
|
+
optional :reason_code, enum: -> { EInvoiceAPI::Allowance::ReasonCode }, nil?: true
|
|
37
38
|
|
|
38
39
|
# @!attribute tax_code
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
40
|
+
# The VAT category code that applies to the allowance
|
|
42
41
|
#
|
|
43
42
|
# @return [Symbol, EInvoiceAPI::Models::Allowance::TaxCode, nil]
|
|
44
|
-
optional :tax_code, enum: -> { EInvoiceAPI::Allowance::TaxCode }
|
|
43
|
+
optional :tax_code, enum: -> { EInvoiceAPI::Allowance::TaxCode }
|
|
45
44
|
|
|
46
45
|
# @!attribute tax_rate
|
|
47
|
-
# The VAT rate, represented as percentage that applies to the allowance
|
|
46
|
+
# The VAT rate, represented as percentage that applies to the allowance. Must be
|
|
47
|
+
# rounded to maximum 2 decimals
|
|
48
48
|
#
|
|
49
49
|
# @return [String, nil]
|
|
50
50
|
optional :tax_rate, String, nil?: true
|
|
@@ -63,15 +63,43 @@ module EInvoiceAPI
|
|
|
63
63
|
#
|
|
64
64
|
# @param reason [String, nil] The reason for the allowance
|
|
65
65
|
#
|
|
66
|
-
# @param reason_code [
|
|
66
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
|
|
67
67
|
#
|
|
68
|
-
# @param tax_code [Symbol, EInvoiceAPI::Models::Allowance::TaxCode
|
|
68
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::Allowance::TaxCode] The VAT category code that applies to the allowance
|
|
69
69
|
#
|
|
70
|
-
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
|
|
70
|
+
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance. Must be r
|
|
71
71
|
|
|
72
|
-
#
|
|
72
|
+
# Allowance reason codes for invoice discounts and charges
|
|
73
73
|
#
|
|
74
|
-
#
|
|
74
|
+
# @see EInvoiceAPI::Models::Allowance#reason_code
|
|
75
|
+
module ReasonCode
|
|
76
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
77
|
+
|
|
78
|
+
REASON_CODE_41 = :"41"
|
|
79
|
+
REASON_CODE_42 = :"42"
|
|
80
|
+
REASON_CODE_60 = :"60"
|
|
81
|
+
REASON_CODE_62 = :"62"
|
|
82
|
+
REASON_CODE_63 = :"63"
|
|
83
|
+
REASON_CODE_64 = :"64"
|
|
84
|
+
REASON_CODE_65 = :"65"
|
|
85
|
+
REASON_CODE_66 = :"66"
|
|
86
|
+
REASON_CODE_67 = :"67"
|
|
87
|
+
REASON_CODE_68 = :"68"
|
|
88
|
+
REASON_CODE_70 = :"70"
|
|
89
|
+
REASON_CODE_71 = :"71"
|
|
90
|
+
REASON_CODE_88 = :"88"
|
|
91
|
+
REASON_CODE_95 = :"95"
|
|
92
|
+
REASON_CODE_100 = :"100"
|
|
93
|
+
REASON_CODE_102 = :"102"
|
|
94
|
+
REASON_CODE_103 = :"103"
|
|
95
|
+
REASON_CODE_104 = :"104"
|
|
96
|
+
REASON_CODE_105 = :"105"
|
|
97
|
+
|
|
98
|
+
# @!method self.values
|
|
99
|
+
# @return [Array<Symbol>]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# The VAT category code that applies to the allowance
|
|
75
103
|
#
|
|
76
104
|
# @see EInvoiceAPI::Models::Allowance#tax_code
|
|
77
105
|
module TaxCode
|
|
@@ -30,10 +30,10 @@ module EInvoiceAPI
|
|
|
30
30
|
optional :reason, String, nil?: true
|
|
31
31
|
|
|
32
32
|
# @!attribute reason_code
|
|
33
|
-
#
|
|
33
|
+
# Charge reason codes for invoice charges and fees
|
|
34
34
|
#
|
|
35
|
-
# @return [
|
|
36
|
-
optional :reason_code,
|
|
35
|
+
# @return [Symbol, EInvoiceAPI::Models::Charge::ReasonCode, nil]
|
|
36
|
+
optional :reason_code, enum: -> { EInvoiceAPI::Charge::ReasonCode }, nil?: true
|
|
37
37
|
|
|
38
38
|
# @!attribute tax_code
|
|
39
39
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
@@ -63,12 +63,201 @@ module EInvoiceAPI
|
|
|
63
63
|
#
|
|
64
64
|
# @param reason [String, nil] The reason for the charge
|
|
65
65
|
#
|
|
66
|
-
# @param reason_code [
|
|
66
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
|
|
67
67
|
#
|
|
68
68
|
# @param tax_code [Symbol, EInvoiceAPI::Models::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
69
69
|
#
|
|
70
70
|
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
71
71
|
|
|
72
|
+
# Charge reason codes for invoice charges and fees
|
|
73
|
+
#
|
|
74
|
+
# @see EInvoiceAPI::Models::Charge#reason_code
|
|
75
|
+
module ReasonCode
|
|
76
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
77
|
+
|
|
78
|
+
AA = :AA
|
|
79
|
+
AAA = :AAA
|
|
80
|
+
AAC = :AAC
|
|
81
|
+
AAD = :AAD
|
|
82
|
+
AAE = :AAE
|
|
83
|
+
AAF = :AAF
|
|
84
|
+
AAH = :AAH
|
|
85
|
+
AAI = :AAI
|
|
86
|
+
AAS = :AAS
|
|
87
|
+
AAT = :AAT
|
|
88
|
+
AAV = :AAV
|
|
89
|
+
AAY = :AAY
|
|
90
|
+
AAZ = :AAZ
|
|
91
|
+
ABA = :ABA
|
|
92
|
+
ABB = :ABB
|
|
93
|
+
ABC = :ABC
|
|
94
|
+
ABD = :ABD
|
|
95
|
+
ABF = :ABF
|
|
96
|
+
ABK = :ABK
|
|
97
|
+
ABL = :ABL
|
|
98
|
+
ABN = :ABN
|
|
99
|
+
ABR = :ABR
|
|
100
|
+
ABS = :ABS
|
|
101
|
+
ABT = :ABT
|
|
102
|
+
ABU = :ABU
|
|
103
|
+
ACF = :ACF
|
|
104
|
+
ACG = :ACG
|
|
105
|
+
ACH = :ACH
|
|
106
|
+
ACI = :ACI
|
|
107
|
+
ACJ = :ACJ
|
|
108
|
+
ACK = :ACK
|
|
109
|
+
ACL = :ACL
|
|
110
|
+
ACM = :ACM
|
|
111
|
+
ACS = :ACS
|
|
112
|
+
ADC = :ADC
|
|
113
|
+
ADE = :ADE
|
|
114
|
+
ADJ = :ADJ
|
|
115
|
+
ADK = :ADK
|
|
116
|
+
ADL = :ADL
|
|
117
|
+
ADM = :ADM
|
|
118
|
+
ADN = :ADN
|
|
119
|
+
ADO = :ADO
|
|
120
|
+
ADP = :ADP
|
|
121
|
+
ADQ = :ADQ
|
|
122
|
+
ADR = :ADR
|
|
123
|
+
ADT = :ADT
|
|
124
|
+
ADW = :ADW
|
|
125
|
+
ADY = :ADY
|
|
126
|
+
ADZ = :ADZ
|
|
127
|
+
AEA = :AEA
|
|
128
|
+
AEB = :AEB
|
|
129
|
+
AEC = :AEC
|
|
130
|
+
AED = :AED
|
|
131
|
+
AEF = :AEF
|
|
132
|
+
AEH = :AEH
|
|
133
|
+
AEI = :AEI
|
|
134
|
+
AEJ = :AEJ
|
|
135
|
+
AEK = :AEK
|
|
136
|
+
AEL = :AEL
|
|
137
|
+
AEM = :AEM
|
|
138
|
+
AEN = :AEN
|
|
139
|
+
AEO = :AEO
|
|
140
|
+
AEP = :AEP
|
|
141
|
+
AES = :AES
|
|
142
|
+
AET = :AET
|
|
143
|
+
AEU = :AEU
|
|
144
|
+
AEV = :AEV
|
|
145
|
+
AEW = :AEW
|
|
146
|
+
AEX = :AEX
|
|
147
|
+
AEY = :AEY
|
|
148
|
+
AEZ = :AEZ
|
|
149
|
+
AJ = :AJ
|
|
150
|
+
AU = :AU
|
|
151
|
+
CA = :CA
|
|
152
|
+
CAB = :CAB
|
|
153
|
+
CAD = :CAD
|
|
154
|
+
CAE = :CAE
|
|
155
|
+
CAF = :CAF
|
|
156
|
+
CAI = :CAI
|
|
157
|
+
CAJ = :CAJ
|
|
158
|
+
CAK = :CAK
|
|
159
|
+
CAL = :CAL
|
|
160
|
+
CAM = :CAM
|
|
161
|
+
CAN = :CAN
|
|
162
|
+
CAO = :CAO
|
|
163
|
+
CAP = :CAP
|
|
164
|
+
CAQ = :CAQ
|
|
165
|
+
CAR = :CAR
|
|
166
|
+
CAS = :CAS
|
|
167
|
+
CAT = :CAT
|
|
168
|
+
CAU = :CAU
|
|
169
|
+
CAV = :CAV
|
|
170
|
+
CAW = :CAW
|
|
171
|
+
CAX = :CAX
|
|
172
|
+
CAY = :CAY
|
|
173
|
+
CAZ = :CAZ
|
|
174
|
+
CD = :CD
|
|
175
|
+
CG = :CG
|
|
176
|
+
CS = :CS
|
|
177
|
+
CT = :CT
|
|
178
|
+
DAB = :DAB
|
|
179
|
+
DAC = :DAC
|
|
180
|
+
DAD = :DAD
|
|
181
|
+
DAF = :DAF
|
|
182
|
+
DAG = :DAG
|
|
183
|
+
DAH = :DAH
|
|
184
|
+
DAI = :DAI
|
|
185
|
+
DAJ = :DAJ
|
|
186
|
+
DAK = :DAK
|
|
187
|
+
DAL = :DAL
|
|
188
|
+
DAM = :DAM
|
|
189
|
+
DAN = :DAN
|
|
190
|
+
DAO = :DAO
|
|
191
|
+
DAP = :DAP
|
|
192
|
+
DAQ = :DAQ
|
|
193
|
+
DL = :DL
|
|
194
|
+
EG = :EG
|
|
195
|
+
EP = :EP
|
|
196
|
+
ER = :ER
|
|
197
|
+
FAA = :FAA
|
|
198
|
+
FAB = :FAB
|
|
199
|
+
FAC = :FAC
|
|
200
|
+
FC = :FC
|
|
201
|
+
FH = :FH
|
|
202
|
+
FI = :FI
|
|
203
|
+
GAA = :GAA
|
|
204
|
+
HAA = :HAA
|
|
205
|
+
HD = :HD
|
|
206
|
+
HH = :HH
|
|
207
|
+
IAA = :IAA
|
|
208
|
+
IAB = :IAB
|
|
209
|
+
ID = :ID
|
|
210
|
+
IF = :IF
|
|
211
|
+
IR = :IR
|
|
212
|
+
IS = :IS
|
|
213
|
+
KO = :KO
|
|
214
|
+
L1 = :L1
|
|
215
|
+
LA = :LA
|
|
216
|
+
LAA = :LAA
|
|
217
|
+
LAB = :LAB
|
|
218
|
+
LF = :LF
|
|
219
|
+
MAE = :MAE
|
|
220
|
+
MI = :MI
|
|
221
|
+
ML = :ML
|
|
222
|
+
NAA = :NAA
|
|
223
|
+
OA = :OA
|
|
224
|
+
PA = :PA
|
|
225
|
+
PAA = :PAA
|
|
226
|
+
PC = :PC
|
|
227
|
+
PL = :PL
|
|
228
|
+
PRV = :PRV
|
|
229
|
+
RAB = :RAB
|
|
230
|
+
RAC = :RAC
|
|
231
|
+
RAD = :RAD
|
|
232
|
+
RAF = :RAF
|
|
233
|
+
RE = :RE
|
|
234
|
+
RF = :RF
|
|
235
|
+
RH = :RH
|
|
236
|
+
RV = :RV
|
|
237
|
+
SA = :SA
|
|
238
|
+
SAA = :SAA
|
|
239
|
+
SAD = :SAD
|
|
240
|
+
SAE = :SAE
|
|
241
|
+
SAI = :SAI
|
|
242
|
+
SG = :SG
|
|
243
|
+
SH = :SH
|
|
244
|
+
SM = :SM
|
|
245
|
+
SU = :SU
|
|
246
|
+
TAB = :TAB
|
|
247
|
+
TAC = :TAC
|
|
248
|
+
TT = :TT
|
|
249
|
+
TV = :TV
|
|
250
|
+
V1 = :V1
|
|
251
|
+
V2 = :V2
|
|
252
|
+
WH = :WH
|
|
253
|
+
XAA = :XAA
|
|
254
|
+
YY = :YY
|
|
255
|
+
ZZZ = :ZZZ
|
|
256
|
+
|
|
257
|
+
# @!method self.values
|
|
258
|
+
# @return [Array<Symbol>]
|
|
259
|
+
end
|
|
260
|
+
|
|
72
261
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
73
262
|
#
|
|
74
263
|
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|