factpulse 3.0.37 → 4.0.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 +10 -13
- data/Gemfile.lock +1 -1
- data/README.md +136 -138
- data/docs/ChorusProCredentials.md +8 -8
- data/docs/ChorusProDestination.md +1 -1
- data/docs/FactureElectroniqueModelsInvoiceTypeCode.md +15 -0
- data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
- data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +26 -0
- data/docs/GetChorusProIdRequest.md +1 -1
- data/docs/GetInvoiceRequest.md +1 -1
- data/docs/GetStructureRequest.md +1 -1
- data/docs/InvoiceInput.md +1 -1
- data/docs/Recipient.md +1 -1
- data/docs/SearchStructureRequest.md +1 -1
- data/docs/SimplifiedInvoiceData.md +1 -1
- data/docs/SubmitCompleteInvoiceResponse.md +2 -2
- data/docs/SubmitInvoiceRequest.md +1 -1
- data/docs/Supplier.md +1 -1
- data/docs/ValidateCDARResponse.md +2 -2
- data/docs/ValidationErrorResponse.md +2 -8
- data/lib/factpulse/helpers/client.rb +152 -770
- data/lib/factpulse/helpers/exceptions.rb +38 -14
- data/lib/factpulse/helpers/helpers.rb +8 -7
- data/lib/factpulse/models/chorus_pro_credentials.rb +94 -26
- data/lib/factpulse/models/chorus_pro_destination.rb +1 -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/{facture_electronique_rest_api_schemas_validation_validation_error_response.rb → facture_electronique_rest_api_schemas_cdar_validation_error_response.rb} +70 -23
- data/lib/factpulse/models/{facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb} +29 -97
- data/lib/factpulse/models/get_chorus_pro_id_request.rb +1 -1
- data/lib/factpulse/models/get_invoice_request.rb +1 -1
- data/lib/factpulse/models/get_structure_request.rb +1 -1
- data/lib/factpulse/models/invoice_input.rb +1 -1
- data/lib/factpulse/models/invoice_type_code.rb +6 -17
- data/lib/factpulse/models/recipient.rb +0 -2
- data/lib/factpulse/models/scheme_id.rb +3 -3
- data/lib/factpulse/models/search_structure_request.rb +1 -1
- data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
- data/lib/factpulse/models/submit_complete_invoice_response.rb +16 -16
- data/lib/factpulse/models/submit_invoice_request.rb +1 -1
- data/lib/factpulse/models/supplier.rb +0 -2
- data/lib/factpulse/models/validate_cdar_response.rb +2 -2
- data/lib/factpulse/models/validation_error_response.rb +20 -67
- data/lib/factpulse/version.rb +1 -1
- data/lib/factpulse.rb +3 -3
- metadata +8 -8
- data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -26
- data/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +0 -15
- data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3a5dc1573d90107b43a2b6973025bd1917906de7e2afa20384d849c977ac612
|
|
4
|
+
data.tar.gz: 4698644d5af9bab97d8b72336bf327556d17e1f5b87b9180b11f901c549b2e11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd537718bb294416f4840b85c9e95decfe3d4202a8f95eb6034f6552afb3ad403b9fe24e8c0311648d80c005c8167077f36d44165b667cb72b407067f3c2fc62
|
|
7
|
+
data.tar.gz: 60226c99c9a1924575c62fff47a95efae0865a4d47b878de42dd757889cea97b495fec15b86e00338e1bc57d957b93843cea89f1db28316e758977ea3eb7d6b6
|
data/CHANGELOG.md
CHANGED
|
@@ -7,18 +7,15 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [
|
|
10
|
+
## [4.0.0] - 2026-01-19
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v3.0.37...HEAD
|
|
24
|
-
[3.0.37]: https://github.com/factpulse/sdk-ruby/releases/tag/v3.0.37
|
|
13
|
+
- Gestion automatique des taches asynchrones
|
|
14
|
+
- Gestion automatique du décodage des documents renvoyés en base 64.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Rework complet du fonctionnement des SDK, fonctionnement totalement générique et transparent
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v4.0.0...HEAD
|
|
21
|
+
[4.0.0]: https://github.com/factpulse/sdk-ruby/releases/tag/v4.0.0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -5,10 +5,10 @@ Official Ruby client for the FactPulse API - French electronic invoicing.
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Factur-X**: Generation and validation of electronic invoices (MINIMUM, BASIC, EN16931, EXTENDED profiles)
|
|
8
|
-
- **Chorus Pro**: Integration with the French public
|
|
9
|
-
- **AFNOR PDP/PA**: Submission of flows compliant with
|
|
10
|
-
- **Electronic signature**: PDF
|
|
11
|
-
- **
|
|
8
|
+
- **Chorus Pro**: Integration with the French public invoicing platform
|
|
9
|
+
- **AFNOR PDP/PA**: Submission of flows compliant with XP Z12-013 standard
|
|
10
|
+
- **Electronic signature**: PDF signing (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
11
|
+
- **Thin HTTP wrapper**: Generic `post` and `get` methods with automatic JWT auth and polling
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -24,180 +24,178 @@ gem 'factpulse'
|
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
27
|
-
The `FactPulse::Helpers` module provides a simplified API with automatic authentication and polling:
|
|
28
|
-
|
|
29
27
|
```ruby
|
|
30
28
|
require 'factpulse'
|
|
31
|
-
|
|
32
|
-
include FactPulse::Helpers
|
|
29
|
+
require 'base64'
|
|
33
30
|
|
|
34
31
|
# Create the client
|
|
35
|
-
client =
|
|
32
|
+
client = FactPulse::Client.new(
|
|
36
33
|
email: 'your_email@example.com',
|
|
37
|
-
password: 'your_password'
|
|
34
|
+
password: 'your_password',
|
|
35
|
+
client_uid: 'your-client-uuid' # From dashboard: Configuration > Clients
|
|
38
36
|
)
|
|
39
37
|
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
# Read your source PDF
|
|
39
|
+
pdf_b64 = Base64.strict_encode64(File.binread('source_invoice.pdf'))
|
|
40
|
+
|
|
41
|
+
# Generate Factur-X and submit to PDP in one call
|
|
42
|
+
result = client.post('processing/invoices/submit-complete-async',
|
|
43
|
+
invoiceData: {
|
|
44
|
+
number: 'INV-2025-001',
|
|
45
|
+
supplier: {
|
|
46
|
+
siret: '12345678901234',
|
|
47
|
+
iban: 'FR7630001007941234567890185',
|
|
48
|
+
routing_address: '12345678901234'
|
|
49
|
+
},
|
|
50
|
+
recipient: {
|
|
51
|
+
siret: '98765432109876',
|
|
52
|
+
routing_address: '98765432109876'
|
|
53
|
+
},
|
|
54
|
+
lines: [
|
|
55
|
+
{
|
|
56
|
+
description: 'Consulting services',
|
|
57
|
+
quantity: 10,
|
|
58
|
+
unitPrice: 100.0,
|
|
59
|
+
vatRate: 20.0
|
|
60
|
+
}
|
|
61
|
+
]
|
|
51
62
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'unitPrice' => 100.0,
|
|
57
|
-
'vatRate' => 20
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
# Generate the Factur-X PDF
|
|
63
|
-
pdf_bytes = client.generate_facturx(invoice_data, 'source_invoice.pdf')
|
|
64
|
-
|
|
65
|
-
File.binwrite('invoice_facturx.pdf', pdf_bytes)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Available Helpers (FactPulse::Helpers::AmountHelpers module)
|
|
69
|
-
|
|
70
|
-
### amount(value)
|
|
71
|
-
|
|
72
|
-
Converts a value to a formatted string for monetary amounts.
|
|
63
|
+
sourcePdf: pdf_b64,
|
|
64
|
+
profile: 'EN16931',
|
|
65
|
+
destination: { type: 'afnor' }
|
|
66
|
+
)
|
|
73
67
|
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
# PDF is in result['content'] (auto-polled, auto-decoded)
|
|
69
|
+
File.binwrite('facturx_invoice.pdf', result['content'])
|
|
76
70
|
|
|
77
|
-
|
|
78
|
-
AmountHelpers.amount('1234.56') # "1234.56"
|
|
79
|
-
AmountHelpers.amount(nil) # "0.00"
|
|
71
|
+
puts "Flow ID: #{result['afnorResult']['flowId']}"
|
|
80
72
|
```
|
|
81
73
|
|
|
82
|
-
|
|
74
|
+
## API Methods
|
|
83
75
|
|
|
84
|
-
|
|
76
|
+
The SDK provides two generic methods that map directly to API endpoints:
|
|
85
77
|
|
|
86
78
|
```ruby
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
200.00, # vat
|
|
90
|
-
1200.00, # incl_tax
|
|
91
|
-
1200.00, # amount_due
|
|
92
|
-
discount_incl_tax: 50.00, # optional
|
|
93
|
-
discount_reason: 'Loyalty discount', # optional
|
|
94
|
-
prepayment: 100.00 # optional
|
|
95
|
-
)
|
|
96
|
-
```
|
|
79
|
+
# POST /api/v1/{path}
|
|
80
|
+
result = client.post('path/to/endpoint', key1: value1, key2: value2)
|
|
97
81
|
|
|
98
|
-
|
|
82
|
+
# GET /api/v1/{path}
|
|
83
|
+
result = client.get('path/to/endpoint', param1: value1)
|
|
84
|
+
```
|
|
99
85
|
|
|
100
|
-
|
|
86
|
+
### Common Endpoints
|
|
101
87
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
reference: 'REF-001' # optional
|
|
113
|
-
)
|
|
114
|
-
```
|
|
88
|
+
| Endpoint | Method | Description |
|
|
89
|
+
|----------|--------|-------------|
|
|
90
|
+
| `processing/invoices/submit-complete-async` | POST | Generate Factur-X + submit to PDP |
|
|
91
|
+
| `processing/generate-invoice` | POST | Generate Factur-X XML or PDF |
|
|
92
|
+
| `processing/validate-xml` | POST | Validate Factur-X XML |
|
|
93
|
+
| `processing/validate-facturx-pdf` | POST | Validate Factur-X PDF |
|
|
94
|
+
| `processing/sign-pdf` | POST | Sign PDF with certificate |
|
|
95
|
+
| `afnor/flow/v1/flows` | POST | Submit flow to AFNOR PDP |
|
|
96
|
+
| `afnor/incoming-flows/{flow_id}` | GET | Get incoming invoice |
|
|
97
|
+
| `chorus-pro/factures/soumettre` | POST | Submit to Chorus Pro |
|
|
115
98
|
|
|
116
|
-
|
|
99
|
+
## Webhooks
|
|
117
100
|
|
|
118
|
-
|
|
101
|
+
Instead of polling, you can receive results via webhook by adding `callbackUrl`:
|
|
119
102
|
|
|
120
103
|
```ruby
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
104
|
+
result = client.post('processing/invoices/submit-complete-async',
|
|
105
|
+
invoiceData: invoice_data,
|
|
106
|
+
sourcePdf: pdf_b64,
|
|
107
|
+
destination: { type: 'afnor' },
|
|
108
|
+
callbackUrl: 'https://your-server.com/webhook/factpulse',
|
|
109
|
+
webhookMode: 'INLINE' # or 'DOWNLOAD_URL'
|
|
126
110
|
)
|
|
127
|
-
```
|
|
128
111
|
|
|
129
|
-
|
|
112
|
+
task_id = result['taskId']
|
|
113
|
+
# Result will be POSTed to your webhook URL
|
|
114
|
+
```
|
|
130
115
|
|
|
131
|
-
|
|
116
|
+
### Webhook Receiver Example (Sinatra)
|
|
132
117
|
|
|
133
118
|
```ruby
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
)
|
|
119
|
+
require 'sinatra'
|
|
120
|
+
require 'json'
|
|
121
|
+
require 'openssl'
|
|
122
|
+
|
|
123
|
+
WEBHOOK_SECRET = 'your-shared-secret'
|
|
124
|
+
|
|
125
|
+
def verify_signature(payload, signature)
|
|
126
|
+
return false unless signature&.start_with?('sha256=')
|
|
127
|
+
|
|
128
|
+
expected = OpenSSL::HMAC.hexdigest('SHA256', WEBHOOK_SECRET, payload)
|
|
129
|
+
Rack::Utils.secure_compare(expected, signature[7..])
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
post '/webhook/factpulse' do
|
|
133
|
+
payload = request.body.read
|
|
134
|
+
signature = request.env['HTTP_X_WEBHOOK_SIGNATURE']
|
|
135
|
+
|
|
136
|
+
unless verify_signature(payload, signature)
|
|
137
|
+
halt 401, { error: 'Invalid signature' }.to_json
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
event = JSON.parse(payload)
|
|
141
|
+
event_type = event['event_type']
|
|
142
|
+
data = event['data']
|
|
143
|
+
|
|
144
|
+
case event_type
|
|
145
|
+
when 'submission.completed'
|
|
146
|
+
flow_id = data.dig('afnorResult', 'flowId')
|
|
147
|
+
puts "Invoice submitted: #{flow_id}"
|
|
148
|
+
when 'submission.failed'
|
|
149
|
+
puts "Submission failed: #{data['error']}"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
content_type :json
|
|
153
|
+
{ status: 'received' }.to_json
|
|
154
|
+
end
|
|
141
155
|
```
|
|
142
156
|
|
|
143
|
-
###
|
|
144
|
-
|
|
145
|
-
Creates a complete supplier with automatic calculation of SIREN and intra-community VAT.
|
|
157
|
+
### Webhook Event Types
|
|
146
158
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
# SIREN and intra-community VAT automatically calculated
|
|
157
|
-
```
|
|
159
|
+
| Event | Description |
|
|
160
|
+
|-------|-------------|
|
|
161
|
+
| `generation.completed` | Factur-X generated successfully |
|
|
162
|
+
| `generation.failed` | Generation failed |
|
|
163
|
+
| `validation.completed` | Validation passed |
|
|
164
|
+
| `validation.failed` | Validation failed |
|
|
165
|
+
| `signature.completed` | PDF signed |
|
|
166
|
+
| `submission.completed` | Submitted to PDP/Chorus |
|
|
167
|
+
| `submission.failed` | Submission failed |
|
|
158
168
|
|
|
159
|
-
|
|
169
|
+
## Zero-Storage Mode
|
|
160
170
|
|
|
161
|
-
|
|
171
|
+
Pass PDP credentials directly in the request (no server-side storage):
|
|
162
172
|
|
|
163
173
|
```ruby
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
result = client.post('processing/invoices/submit-complete-async',
|
|
175
|
+
invoiceData: invoice_data,
|
|
176
|
+
sourcePdf: pdf_b64,
|
|
177
|
+
destination: {
|
|
178
|
+
type: 'afnor',
|
|
179
|
+
flowServiceUrl: 'https://api.pdp.example.com/flow/v1',
|
|
180
|
+
tokenUrl: 'https://auth.pdp.example.com/oauth/token',
|
|
181
|
+
clientId: 'your_pdp_client_id',
|
|
182
|
+
clientSecret: 'your_pdp_client_secret'
|
|
183
|
+
}
|
|
170
184
|
)
|
|
171
185
|
```
|
|
172
186
|
|
|
173
|
-
##
|
|
174
|
-
|
|
175
|
-
To pass your own credentials without server-side storage:
|
|
187
|
+
## Error Handling
|
|
176
188
|
|
|
177
189
|
```ruby
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
chorus_creds = ChorusProCredentials.new(
|
|
181
|
-
piste_client_id: 'your_client_id',
|
|
182
|
-
piste_client_secret: 'your_client_secret',
|
|
183
|
-
chorus_pro_login: 'your_login',
|
|
184
|
-
chorus_pro_password: 'your_password',
|
|
185
|
-
sandbox: true
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
afnor_creds = AFNORCredentials.new(
|
|
189
|
-
flow_service_url: 'https://api.pdp.fr/flow/v1',
|
|
190
|
-
token_url: 'https://auth.pdp.fr/oauth/token',
|
|
191
|
-
client_id: 'your_client_id',
|
|
192
|
-
client_secret: 'your_client_secret'
|
|
193
|
-
)
|
|
190
|
+
require 'factpulse'
|
|
194
191
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
192
|
+
begin
|
|
193
|
+
result = client.post('processing/validate-xml', xmlContent: xml_string)
|
|
194
|
+
rescue FactPulse::Error => e
|
|
195
|
+
puts "Error: #{e.message}"
|
|
196
|
+
puts "Status code: #{e.status_code}"
|
|
197
|
+
puts "Details: #{e.details}"
|
|
198
|
+
end
|
|
201
199
|
```
|
|
202
200
|
|
|
203
201
|
## Resources
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **piste_client_id** | **String** |
|
|
8
|
-
| **piste_client_secret** | **String** |
|
|
9
|
-
| **
|
|
10
|
-
| **
|
|
11
|
-
| **
|
|
7
|
+
| **piste_client_id** | **String** | PISTE Client ID (government API portal) | |
|
|
8
|
+
| **piste_client_secret** | **String** | PISTE Client Secret | |
|
|
9
|
+
| **chorus_pro_login** | **String** | Chorus Pro login | |
|
|
10
|
+
| **chorus_pro_password** | **String** | Chorus Pro password | |
|
|
11
|
+
| **sandbox** | **Boolean** | Use sandbox environment (true) or production (false) | [optional][default to true] |
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -18,9 +18,9 @@ require 'factpulse'
|
|
|
18
18
|
instance = FactPulse::ChorusProCredentials.new(
|
|
19
19
|
piste_client_id: null,
|
|
20
20
|
piste_client_secret: null,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
chorus_pro_login: null,
|
|
22
|
+
chorus_pro_password: null,
|
|
23
|
+
sandbox: null
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **type** | **String** | | [optional][default to 'chorus_pro'] |
|
|
8
|
-
| **credentials** | [**
|
|
8
|
+
| **credentials** | [**FactureElectroniqueRestApiSchemasProcessingChorusProCredentials**](FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **field** | **String** | Champ concerné | |
|
|
8
|
+
| **message** | **String** | Message d'erreur | |
|
|
9
|
+
| **rule** | **String** | | [optional] |
|
|
10
|
+
| **severity** | **String** | Sévérité (error/warning) | [optional][default to 'error'] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'factpulse'
|
|
16
|
+
|
|
17
|
+
instance = FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.new(
|
|
18
|
+
field: null,
|
|
19
|
+
message: null,
|
|
20
|
+
rule: null,
|
|
21
|
+
severity: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# FactPulse::FactureElectroniqueRestApiSchemasProcessingChorusProCredentials
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **piste_client_id** | **String** | | [optional] |
|
|
8
|
+
| **piste_client_secret** | **String** | | [optional] |
|
|
9
|
+
| **chorus_login** | **String** | | [optional] |
|
|
10
|
+
| **chorus_password** | **String** | | [optional] |
|
|
11
|
+
| **sandbox_mode** | **Boolean** | [MODE 2] Use sandbox mode (default: True) | [optional][default to true] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'factpulse'
|
|
17
|
+
|
|
18
|
+
instance = FactPulse::FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.new(
|
|
19
|
+
piste_client_id: null,
|
|
20
|
+
piste_client_secret: null,
|
|
21
|
+
chorus_login: null,
|
|
22
|
+
chorus_password: null,
|
|
23
|
+
sandbox_mode: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credentials** | [**
|
|
7
|
+
| **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
|
|
8
8
|
| **siret** | **String** | Structure SIRET (14 digits) | |
|
|
9
9
|
| **identifier_type** | **String** | Identifier type (SIRET, SIREN, UE_HORS_FRANCE, etc.) | [optional][default to 'SIRET'] |
|
|
10
10
|
|
data/docs/GetInvoiceRequest.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credentials** | [**
|
|
7
|
+
| **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
|
|
8
8
|
| **chorus_invoice_id** | **Integer** | Chorus Pro invoice ID | |
|
|
9
9
|
|
|
10
10
|
## Example
|
data/docs/GetStructureRequest.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credentials** | [**
|
|
7
|
+
| **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
|
|
8
8
|
| **structure_id** | **Integer** | Chorus Pro structure ID | |
|
|
9
9
|
| **language_code** | **String** | Language code (fr, en) | [optional][default to 'fr'] |
|
|
10
10
|
|
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 | |
|
data/docs/Recipient.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | |
|
|
7
|
+
| **electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [optional] |
|
|
8
8
|
| **executing_service_code** | **String** | | [optional] |
|
|
9
9
|
| **name** | **String** | | [optional] |
|
|
10
10
|
| **siren** | **String** | | [optional] |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credentials** | [**
|
|
7
|
+
| **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
|
|
8
8
|
| **structure_identifier** | **String** | | [optional] |
|
|
9
9
|
| **structure_identifier_type** | **String** | | [optional] |
|
|
10
10
|
| **company_name** | **String** | | [optional] |
|
|
@@ -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] |
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **enriched_invoice** | [**EnrichedInvoiceInfo**](EnrichedInvoiceInfo.md) | Enriched invoice data | |
|
|
12
12
|
| **facturx_pdf** | [**FacturXPDFInfo**](FacturXPDFInfo.md) | Generated PDF information | |
|
|
13
13
|
| **signature** | [**SignatureInfo**](SignatureInfo.md) | | [optional] |
|
|
14
|
-
| **
|
|
14
|
+
| **content_b64** | **String** | Generated Factur-X PDF (and signed if requested) base64-encoded | |
|
|
15
15
|
| **message** | **String** | Return message | |
|
|
16
16
|
|
|
17
17
|
## Example
|
|
@@ -27,7 +27,7 @@ instance = FactPulse::SubmitCompleteInvoiceResponse.new(
|
|
|
27
27
|
enriched_invoice: null,
|
|
28
28
|
facturx_pdf: null,
|
|
29
29
|
signature: null,
|
|
30
|
-
|
|
30
|
+
content_b64: null,
|
|
31
31
|
message: null
|
|
32
32
|
)
|
|
33
33
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credentials** | [**
|
|
7
|
+
| **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
|
|
8
8
|
| **invoice_number** | **String** | Invoice number | |
|
|
9
9
|
| **invoice_date** | **String** | Invoice date (ISO format: YYYY-MM-DD) | |
|
|
10
10
|
| **payment_due_date** | **String** | | [optional] |
|
data/docs/Supplier.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | |
|
|
7
|
+
| **electronic_address** | [**ElectronicAddress**](ElectronicAddress.md) | | [optional] |
|
|
8
8
|
| **supplier_id** | **Integer** | | |
|
|
9
9
|
| **private_id** | **String** | | [optional] |
|
|
10
10
|
| **supplier_bank_account_code** | **Integer** | | [optional] |
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **valid** | **Boolean** | Résultat de validation | |
|
|
8
|
-
| **errors** | [**Array<
|
|
9
|
-
| **warnings** | [**Array<
|
|
8
|
+
| **errors** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des erreurs | [optional] |
|
|
9
|
+
| **warnings** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des avertissements | [optional] |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
8
|
-
| **message** | **String** | Message d'erreur | |
|
|
9
|
-
| **rule** | **String** | | [optional] |
|
|
10
|
-
| **severity** | **String** | Sévérité (error/warning) | [optional][default to 'error'] |
|
|
7
|
+
| **detail** | **Array<String>** | List of detected validation errors. | |
|
|
11
8
|
|
|
12
9
|
## Example
|
|
13
10
|
|
|
@@ -15,10 +12,7 @@
|
|
|
15
12
|
require 'factpulse'
|
|
16
13
|
|
|
17
14
|
instance = FactPulse::ValidationErrorResponse.new(
|
|
18
|
-
|
|
19
|
-
message: null,
|
|
20
|
-
rule: null,
|
|
21
|
-
severity: null
|
|
15
|
+
detail: null
|
|
22
16
|
)
|
|
23
17
|
```
|
|
24
18
|
|