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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acc461cec6e349339999ef2bcefdc9167ffeacb88ff0f9c22e64e0183a182b42
4
- data.tar.gz: b5f252d6a21c3bef0a029a6a11e4e35b9b3aa2cf44155e2fd5c4399174322385
3
+ metadata.gz: 477a27854ed3cda2c61b51c1d6ab4e832934b7f5e8dd433401390bb6f3872f47
4
+ data.tar.gz: 77f5c58390f8e725fcf6b203cc37fa10cefe8c6d556a30768ca9d81561643262
5
5
  SHA512:
6
- metadata.gz: d6f8183133fd3fcefe861fae183ad462c008f236dc4b0f9563797e88f30063c3137bf628ddbef2d261ffca7bed7e904c92f6b133d4ab3a08aa40e29907e07775
7
- data.tar.gz: 02b6af0e6c841d0379db6b72d7bf4f1f648662f82934d9670a0f6ae3d2f07c785bdee2a13118643bf354aa96aa68037acfa02300b772a79d4e10a67cead31221
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.33] - 2026-01-17
10
+ ## [3.0.35] - 2026-01-17
11
11
 
12
12
  ### Added
13
- - Support API cycle de vie CDAR
14
-
15
- ### Fixed
16
- - Soumission AFNOR dans le flux complet
17
-
18
-
19
- [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v3.0.33...HEAD
20
- [3.0.33]: https://github.com/factpulse/sdk-ruby/releases/tag/v3.0.33
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- factpulse (3.0.33)
4
+ factpulse (3.0.35)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -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** | [**FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode**](FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md) | Invoice type code | [optional] |
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** | [**InvoiceTypeCode**](InvoiceTypeCode.md) | Document type (UNTDID 1001). Default: 380 (Invoice). | [optional] |
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 FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode
18
- N380 = "380".freeze
19
- N381 = "381".freeze
20
- N384 = "384".freeze
21
- N389 = "389".freeze
22
- N386 = "386".freeze
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 ||= [N380, N381, N384, N389, N386].freeze
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 FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.all_vars.include?(value)
40
- raise "Invalid ENUM value #{value} for class #FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode"
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' => :'FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode',
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
- 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
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 ||= [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
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' => :'InvoiceTypeCode',
114
+ :'invoice_type' => :'FactureElectroniqueModelsInvoiceTypeCode',
115
115
  :'preceding_invoice_reference' => :'String',
116
116
  :'operation_nature' => :'OperationNature',
117
117
  :'invoicing_framework' => :'InvoicingFrameworkCode'
@@ -11,5 +11,5 @@ Generator version: 7.19.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module FactPulse
14
- VERSION = '3.0.33'
14
+ VERSION = '3.0.35'
15
15
  end
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.33
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
-