factpulse 3.0.33 → 3.0.35
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 +13 -9
- data/Gemfile.lock +1 -1
- data/docs/FactureElectroniqueModelsInvoiceTypeCode.md +15 -0
- data/docs/InvoiceInput.md +1 -1
- data/docs/SimplifiedInvoiceData.md +1 -1
- data/lib/factpulse/helpers/client.rb +17 -1
- data/lib/factpulse/models/{facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb → facture_electronique_models_invoice_type_code.rb} +20 -9
- data/lib/factpulse/models/invoice_input.rb +1 -1
- data/lib/factpulse/models/invoice_type_code.rb +6 -17
- data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
- data/lib/factpulse/version.rb +1 -1
- data/lib/factpulse.rb +1 -1
- metadata +3 -3
- data/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 477a27854ed3cda2c61b51c1d6ab4e832934b7f5e8dd433401390bb6f3872f47
|
|
4
|
+
data.tar.gz: 77f5c58390f8e725fcf6b203cc37fa10cefe8c6d556a30768ca9d81561643262
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d352cfa56db2b0439511652a6be16fa38073da747dceed23f4d75965a44a0419b8dcab122f1a3686dec6ecd9e40f83b7ee3b855dfd86c8dd61d641611cf5b8d
|
|
7
|
+
data.tar.gz: 5268347f81ee0bd7976edb98cfa7f68724b6ed5ae8b31c6199db4a92fbf7fc7af8981fe84c2f344e4907f09f377ca7bd897ffdbce1d8d832d4822a23c6e36c21
|
data/CHANGELOG.md
CHANGED
|
@@ -7,14 +7,18 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [3.0.
|
|
10
|
+
## [3.0.35] - 2026-01-17
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
- Version initiale du SDK ruby
|
|
14
|
+
- Support complet de l'API FactPulse
|
|
15
|
+
- Endpoints Factur-X (génération, validation)
|
|
16
|
+
- Endpoints AFNOR PDP/PA (Flow Service, Directory Service)
|
|
17
|
+
- Endpoints Chorus Pro (recherche entreprise, soumission factures)
|
|
18
|
+
- Endpoints Signature électronique (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
19
|
+
- Support des deux modes d'authentification (stored credentials et zero-trust)
|
|
20
|
+
- Documentation complète et exemples
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v3.0.35...HEAD
|
|
24
|
+
[3.0.35]: https://github.com/factpulse/sdk-ruby/releases/tag/v3.0.35
|
data/Gemfile.lock
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# FactPulse::FactureElectroniqueModelsInvoiceTypeCode
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
|
|
8
|
+
## Example
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
require 'factpulse'
|
|
12
|
+
|
|
13
|
+
instance = FactPulse::FactureElectroniqueModelsInvoiceTypeCode.new()
|
|
14
|
+
```
|
|
15
|
+
|
data/docs/InvoiceInput.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **invoice_id** | **String** | Invoice identifier | |
|
|
8
8
|
| **issue_date** | **Date** | Invoice issue date | |
|
|
9
|
-
| **type_code** | [**
|
|
9
|
+
| **type_code** | [**InvoiceTypeCode**](InvoiceTypeCode.md) | Invoice type code | [optional] |
|
|
10
10
|
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
|
11
11
|
| **due_date** | **Date** | | [optional] |
|
|
12
12
|
| **seller_siren** | **String** | Seller SIREN/SIRET | |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| **comment** | **String** | | [optional] |
|
|
14
14
|
| **purchase_order_reference** | **String** | | [optional] |
|
|
15
15
|
| **contract_reference** | **String** | | [optional] |
|
|
16
|
-
| **invoice_type** | [**
|
|
16
|
+
| **invoice_type** | [**FactureElectroniqueModelsInvoiceTypeCode**](FactureElectroniqueModelsInvoiceTypeCode.md) | Document type (UNTDID 1001). Default: 380 (Invoice). | [optional] |
|
|
17
17
|
| **preceding_invoice_reference** | **String** | | [optional] |
|
|
18
18
|
| **operation_nature** | [**OperationNature**](OperationNature.md) | | [optional] |
|
|
19
19
|
| **invoicing_framework** | [**InvoicingFrameworkCode**](InvoicingFrameworkCode.md) | | [optional] |
|
|
@@ -247,7 +247,7 @@ module FactPulse
|
|
|
247
247
|
# Build multipart request
|
|
248
248
|
boundary = "----RubyFormBoundary#{SecureRandom.hex(16)}"
|
|
249
249
|
body = build_multipart_body(boundary, [
|
|
250
|
-
{ name: 'invoice_data', content: json_data },
|
|
250
|
+
{ name: 'invoice_data', content: json_data, filename: 'invoice.json', content_type: 'application/json' },
|
|
251
251
|
{ name: 'profile', content: profile },
|
|
252
252
|
{ name: 'output_format', content: output_format },
|
|
253
253
|
{ name: 'source_pdf', content: pdf_content, filename: pdf_filename, content_type: 'application/pdf' }
|
|
@@ -297,6 +297,22 @@ module FactPulse
|
|
|
297
297
|
|
|
298
298
|
if sync && data['taskId']
|
|
299
299
|
result = poll_task(data['taskId'], timeout: timeout)
|
|
300
|
+
|
|
301
|
+
# Check for business error (task succeeded but business result is ERROR)
|
|
302
|
+
if result['status'] == 'ERROR'
|
|
303
|
+
error_msg = result['errorMessage'] || 'Business error'
|
|
304
|
+
errors = (result['details'] || []).map do |d|
|
|
305
|
+
ValidationErrorDetail.new(
|
|
306
|
+
d['level'] || 'ERROR',
|
|
307
|
+
d['item'] || '',
|
|
308
|
+
d['reason'] || '',
|
|
309
|
+
d['source'],
|
|
310
|
+
d['code']
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
raise FactPulseValidationError.new(error_msg, errors)
|
|
314
|
+
end
|
|
315
|
+
|
|
300
316
|
if result['content_b64']
|
|
301
317
|
return Base64.decode64(result['content_b64'])
|
|
302
318
|
elsif result['content_xml']
|
|
@@ -14,15 +14,26 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
class FactureElectroniqueModelsInvoiceTypeCode
|
|
18
|
+
INVOICE = "380".freeze
|
|
19
|
+
SELF_BILLED_INVOICE = "389".freeze
|
|
20
|
+
FACTORED_INVOICE = "393".freeze
|
|
21
|
+
SELF_BILLED_FACTORED_INVOICE = "501".freeze
|
|
22
|
+
PREPAYMENT_INVOICE = "386".freeze
|
|
23
|
+
SELF_BILLED_PREPAYMENT_INVOICE = "500".freeze
|
|
24
|
+
CORRECTIVE_INVOICE = "384".freeze
|
|
25
|
+
SELF_BILLED_CORRECTIVE_INVOICE = "471".freeze
|
|
26
|
+
FACTORED_CORRECTIVE_INVOICE = "472".freeze
|
|
27
|
+
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE = "473".freeze
|
|
28
|
+
CREDIT_NOTE = "381".freeze
|
|
29
|
+
SELF_BILLED_CREDIT_NOTE = "261".freeze
|
|
30
|
+
GLOBAL_ALLOWANCE_CREDIT_NOTE = "262".freeze
|
|
31
|
+
FACTORED_CREDIT_NOTE = "396".freeze
|
|
32
|
+
SELF_BILLED_FACTORED_CREDIT_NOTE = "502".freeze
|
|
33
|
+
PREPAYMENT_CREDIT_NOTE = "503".freeze
|
|
23
34
|
|
|
24
35
|
def self.all_vars
|
|
25
|
-
@all_vars ||= [
|
|
36
|
+
@all_vars ||= [INVOICE, SELF_BILLED_INVOICE, FACTORED_INVOICE, SELF_BILLED_FACTORED_INVOICE, PREPAYMENT_INVOICE, SELF_BILLED_PREPAYMENT_INVOICE, CORRECTIVE_INVOICE, SELF_BILLED_CORRECTIVE_INVOICE, FACTORED_CORRECTIVE_INVOICE, SELF_BILLED_FACTORED_CORRECTIVE_INVOICE, CREDIT_NOTE, SELF_BILLED_CREDIT_NOTE, GLOBAL_ALLOWANCE_CREDIT_NOTE, FACTORED_CREDIT_NOTE, SELF_BILLED_FACTORED_CREDIT_NOTE, PREPAYMENT_CREDIT_NOTE].freeze
|
|
26
37
|
end
|
|
27
38
|
|
|
28
39
|
# Builds the enum from string
|
|
@@ -36,8 +47,8 @@ module FactPulse
|
|
|
36
47
|
# @param [String] The enum value in the form of the string
|
|
37
48
|
# @return [String] The enum value
|
|
38
49
|
def build_from_hash(value)
|
|
39
|
-
return value if
|
|
40
|
-
raise "Invalid ENUM value #{value} for class #
|
|
50
|
+
return value if FactureElectroniqueModelsInvoiceTypeCode.all_vars.include?(value)
|
|
51
|
+
raise "Invalid ENUM value #{value} for class #FactureElectroniqueModelsInvoiceTypeCode"
|
|
41
52
|
end
|
|
42
53
|
end
|
|
43
54
|
end
|
|
@@ -112,7 +112,7 @@ module FactPulse
|
|
|
112
112
|
{
|
|
113
113
|
:'invoice_id' => :'String',
|
|
114
114
|
:'issue_date' => :'Date',
|
|
115
|
-
:'type_code' => :'
|
|
115
|
+
:'type_code' => :'InvoiceTypeCode',
|
|
116
116
|
:'currency' => :'Currency',
|
|
117
117
|
:'due_date' => :'Date',
|
|
118
118
|
:'seller_siren' => :'String',
|
|
@@ -15,25 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
17
|
class InvoiceTypeCode
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
SELF_BILLED_PREPAYMENT_INVOICE = "500".freeze
|
|
24
|
-
CORRECTIVE_INVOICE = "384".freeze
|
|
25
|
-
SELF_BILLED_CORRECTIVE_INVOICE = "471".freeze
|
|
26
|
-
FACTORED_CORRECTIVE_INVOICE = "472".freeze
|
|
27
|
-
SELF_BILLED_FACTORED_CORRECTIVE_INVOICE = "473".freeze
|
|
28
|
-
CREDIT_NOTE = "381".freeze
|
|
29
|
-
SELF_BILLED_CREDIT_NOTE = "261".freeze
|
|
30
|
-
GLOBAL_ALLOWANCE_CREDIT_NOTE = "262".freeze
|
|
31
|
-
FACTORED_CREDIT_NOTE = "396".freeze
|
|
32
|
-
SELF_BILLED_FACTORED_CREDIT_NOTE = "502".freeze
|
|
33
|
-
PREPAYMENT_CREDIT_NOTE = "503".freeze
|
|
18
|
+
N380 = "380".freeze
|
|
19
|
+
N381 = "381".freeze
|
|
20
|
+
N384 = "384".freeze
|
|
21
|
+
N389 = "389".freeze
|
|
22
|
+
N386 = "386".freeze
|
|
34
23
|
|
|
35
24
|
def self.all_vars
|
|
36
|
-
@all_vars ||= [
|
|
25
|
+
@all_vars ||= [N380, N381, N384, N389, N386].freeze
|
|
37
26
|
end
|
|
38
27
|
|
|
39
28
|
# Builds the enum from string
|
|
@@ -111,7 +111,7 @@ module FactPulse
|
|
|
111
111
|
:'comment' => :'String',
|
|
112
112
|
:'purchase_order_reference' => :'String',
|
|
113
113
|
:'contract_reference' => :'String',
|
|
114
|
-
:'invoice_type' => :'
|
|
114
|
+
:'invoice_type' => :'FactureElectroniqueModelsInvoiceTypeCode',
|
|
115
115
|
:'preceding_invoice_reference' => :'String',
|
|
116
116
|
:'operation_nature' => :'OperationNature',
|
|
117
117
|
:'invoicing_framework' => :'InvoicingFrameworkCode'
|
data/lib/factpulse/version.rb
CHANGED
data/lib/factpulse.rb
CHANGED
|
@@ -165,8 +165,8 @@ require 'factpulse/models/error_source'
|
|
|
165
165
|
require 'factpulse/models/extraction_info'
|
|
166
166
|
require 'factpulse/models/factur_x_invoice'
|
|
167
167
|
require 'factpulse/models/factur_xpdf_info'
|
|
168
|
+
require 'factpulse/models/facture_electronique_models_invoice_type_code'
|
|
168
169
|
require 'factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials'
|
|
169
|
-
require 'factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code'
|
|
170
170
|
require 'factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response'
|
|
171
171
|
require 'factpulse/models/field_status'
|
|
172
172
|
require 'factpulse/models/file_info'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: factpulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -271,8 +271,8 @@ files:
|
|
|
271
271
|
- docs/ExtractionInfo.md
|
|
272
272
|
- docs/FacturXInvoice.md
|
|
273
273
|
- docs/FacturXPDFInfo.md
|
|
274
|
+
- docs/FactureElectroniqueModelsInvoiceTypeCode.md
|
|
274
275
|
- docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
|
|
275
|
-
- docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md
|
|
276
276
|
- docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md
|
|
277
277
|
- docs/FieldStatus.md
|
|
278
278
|
- docs/FileInfo.md
|
|
@@ -590,8 +590,8 @@ files:
|
|
|
590
590
|
- lib/factpulse/models/extraction_info.rb
|
|
591
591
|
- lib/factpulse/models/factur_x_invoice.rb
|
|
592
592
|
- lib/factpulse/models/factur_xpdf_info.rb
|
|
593
|
+
- lib/factpulse/models/facture_electronique_models_invoice_type_code.rb
|
|
593
594
|
- lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb
|
|
594
|
-
- lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb
|
|
595
595
|
- lib/factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response.rb
|
|
596
596
|
- lib/factpulse/models/field_status.rb
|
|
597
597
|
- lib/factpulse/models/file_info.rb
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# FactPulse::FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
|
|
8
|
-
## Example
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
require 'factpulse'
|
|
12
|
-
|
|
13
|
-
instance = FactPulse::FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.new()
|
|
14
|
-
```
|
|
15
|
-
|