factpulse 3.0.35 → 3.0.36

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +1 -1
  4. data/docs/ChorusProCredentials.md +8 -8
  5. data/docs/ChorusProDestination.md +1 -1
  6. data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
  7. data/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +15 -0
  8. data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +26 -0
  9. data/docs/GetChorusProIdRequest.md +1 -1
  10. data/docs/GetInvoiceRequest.md +1 -1
  11. data/docs/GetStructureRequest.md +1 -1
  12. data/docs/InvoiceInput.md +1 -1
  13. data/docs/SearchStructureRequest.md +1 -1
  14. data/docs/SimplifiedInvoiceData.md +1 -1
  15. data/docs/SubmitInvoiceRequest.md +1 -1
  16. data/docs/ValidateCDARResponse.md +2 -2
  17. data/docs/ValidationErrorResponse.md +2 -8
  18. data/lib/factpulse/helpers/client.rb +1 -1
  19. data/lib/factpulse/models/chorus_pro_credentials.rb +94 -26
  20. data/lib/factpulse/models/chorus_pro_destination.rb +1 -1
  21. 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
  22. data/lib/factpulse/models/{facture_electronique_models_invoice_type_code.rb → facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb} +9 -20
  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
  24. data/lib/factpulse/models/get_chorus_pro_id_request.rb +1 -1
  25. data/lib/factpulse/models/get_invoice_request.rb +1 -1
  26. data/lib/factpulse/models/get_structure_request.rb +1 -1
  27. data/lib/factpulse/models/invoice_input.rb +1 -1
  28. data/lib/factpulse/models/invoice_type_code.rb +17 -6
  29. data/lib/factpulse/models/search_structure_request.rb +1 -1
  30. data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
  31. data/lib/factpulse/models/submit_invoice_request.rb +1 -1
  32. data/lib/factpulse/models/validate_cdar_response.rb +2 -2
  33. data/lib/factpulse/models/validation_error_response.rb +20 -67
  34. data/lib/factpulse/version.rb +1 -1
  35. data/lib/factpulse.rb +3 -3
  36. metadata +7 -7
  37. data/docs/FactureElectroniqueModelsInvoiceTypeCode.md +0 -15
  38. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -26
  39. data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 477a27854ed3cda2c61b51c1d6ab4e832934b7f5e8dd433401390bb6f3872f47
4
- data.tar.gz: 77f5c58390f8e725fcf6b203cc37fa10cefe8c6d556a30768ca9d81561643262
3
+ metadata.gz: 011c489cc26489a90d040e5a775c0cc3ebd9777811d169dce1b191eeea091304
4
+ data.tar.gz: 40052b31938d7eafb98ca37022597fe2fdd115525616ad3181ba1a1e5a2d270f
5
5
  SHA512:
6
- metadata.gz: 3d352cfa56db2b0439511652a6be16fa38073da747dceed23f4d75965a44a0419b8dcab122f1a3686dec6ecd9e40f83b7ee3b855dfd86c8dd61d641611cf5b8d
7
- data.tar.gz: 5268347f81ee0bd7976edb98cfa7f68724b6ed5ae8b31c6199db4a92fbf7fc7af8981fe84c2f344e4907f09f377ca7bd897ffdbce1d8d832d4822a23c6e36c21
6
+ metadata.gz: b1a8bbfa0b64dbc261d9742d1c6957cbc9f1b8a292b433cc7d00fcf05c827485724519e476f61bd38dac5e2909785d2346937f6f5330d5d9a654d49720f4399b
7
+ data.tar.gz: 78151f5b304c6e9d4f6cc9d1d5f0690dc8e7c9321f83fc933d4ab7723af8775f3f62b2d38475b6c1e5893f393fd5a37ca71fe8b2b6ccd577670c351c710a6610
data/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ 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.35] - 2026-01-17
10
+ ## [3.0.36] - 2026-01-17
11
11
 
12
12
  ### Added
13
13
  - Version initiale du SDK ruby
@@ -20,5 +20,5 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
20
20
  - Documentation complète et exemples
21
21
 
22
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
23
+ [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v3.0.36...HEAD
24
+ [3.0.36]: https://github.com/factpulse/sdk-ruby/releases/tag/v3.0.36
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- factpulse (3.0.35)
4
+ factpulse (3.0.36)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -4,11 +4,11 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
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] |
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
- chorus_login: null,
22
- chorus_password: null,
23
- sandbox_mode: null
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** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
8
+ | **credentials** | [**FactureElectroniqueRestApiSchemasProcessingChorusProCredentials**](FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md) | | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -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,15 @@
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
+
@@ -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** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] |
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
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] |
7
+ | **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
8
8
  | **chorus_invoice_id** | **Integer** | Chorus Pro invoice ID | |
9
9
 
10
10
  ## Example
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] |
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** | [**InvoiceTypeCode**](InvoiceTypeCode.md) | Invoice type code | [optional] |
9
+ | **type_code** | [**FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode**](FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.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 | |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] |
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** | [**FactureElectroniqueModelsInvoiceTypeCode**](FactureElectroniqueModelsInvoiceTypeCode.md) | Document type (UNTDID 1001). Default: 380 (Invoice). | [optional] |
16
+ | **invoice_type** | [**InvoiceTypeCode**](InvoiceTypeCode.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] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **credentials** | [**FactureElectroniqueRestApiSchemasChorusProChorusProCredentials**](FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md) | | [optional] |
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] |
@@ -5,8 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **valid** | **Boolean** | Résultat de validation | |
8
- | **errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des erreurs | [optional] |
9
- | **warnings** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des avertissements | [optional] |
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
- | **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'] |
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
- field: null,
19
- message: null,
20
- rule: null,
21
- severity: null
15
+ detail: null
22
16
  )
23
17
  ```
24
18
 
@@ -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, filename: 'invoice.json', content_type: 'application/json' },
250
+ { name: 'invoice_data', content: json_data, 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' }
@@ -14,27 +14,31 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Optional Chorus Pro credentials. **MODE 1 - JWT retrieval (recommended):** Do not provide this `credentials` field in the payload. Credentials will be automatically retrieved via client_uid from JWT (0-trust). **MODE 2 - Credentials in payload:** Provide all required fields below. Useful for tests or third-party integrations.
17
+ # Chorus Pro credentials for Zero-Trust mode. **Zero-Trust Mode**: Credentials are passed in each request and are NEVER stored. **Security**: - Credentials are never persisted in the database - They are used only for the duration of the request - Secure transmission via HTTPS **Use cases**: - High-security environments (banks, administrations) - Strict GDPR compliance - Tests with temporary credentials - Users who don't want to store their credentials
18
18
  class ChorusProCredentials < ApiModelBase
19
+ # PISTE Client ID (government API portal)
19
20
  attr_accessor :piste_client_id
20
21
 
22
+ # PISTE Client Secret
21
23
  attr_accessor :piste_client_secret
22
24
 
23
- attr_accessor :chorus_login
25
+ # Chorus Pro login
26
+ attr_accessor :chorus_pro_login
24
27
 
25
- attr_accessor :chorus_password
28
+ # Chorus Pro password
29
+ attr_accessor :chorus_pro_password
26
30
 
27
- # [MODE 2] Use sandbox mode (default: True)
28
- attr_accessor :sandbox_mode
31
+ # Use sandbox environment (true) or production (false)
32
+ attr_accessor :sandbox
29
33
 
30
34
  # Attribute mapping from ruby-style variable name to JSON key.
31
35
  def self.attribute_map
32
36
  {
33
37
  :'piste_client_id' => :'pisteClientId',
34
38
  :'piste_client_secret' => :'pisteClientSecret',
35
- :'chorus_login' => :'chorusLogin',
36
- :'chorus_password' => :'chorusPassword',
37
- :'sandbox_mode' => :'sandboxMode'
39
+ :'chorus_pro_login' => :'chorusProLogin',
40
+ :'chorus_pro_password' => :'chorusProPassword',
41
+ :'sandbox' => :'sandbox'
38
42
  }
39
43
  end
40
44
 
@@ -53,19 +57,15 @@ module FactPulse
53
57
  {
54
58
  :'piste_client_id' => :'String',
55
59
  :'piste_client_secret' => :'String',
56
- :'chorus_login' => :'String',
57
- :'chorus_password' => :'String',
58
- :'sandbox_mode' => :'Boolean'
60
+ :'chorus_pro_login' => :'String',
61
+ :'chorus_pro_password' => :'String',
62
+ :'sandbox' => :'Boolean'
59
63
  }
60
64
  end
61
65
 
62
66
  # List of attributes with nullable: true
63
67
  def self.openapi_nullable
64
68
  Set.new([
65
- :'piste_client_id',
66
- :'piste_client_secret',
67
- :'chorus_login',
68
- :'chorus_password',
69
69
  ])
70
70
  end
71
71
 
@@ -87,24 +87,32 @@ module FactPulse
87
87
 
88
88
  if attributes.key?(:'piste_client_id')
89
89
  self.piste_client_id = attributes[:'piste_client_id']
90
+ else
91
+ self.piste_client_id = nil
90
92
  end
91
93
 
92
94
  if attributes.key?(:'piste_client_secret')
93
95
  self.piste_client_secret = attributes[:'piste_client_secret']
96
+ else
97
+ self.piste_client_secret = nil
94
98
  end
95
99
 
96
- if attributes.key?(:'chorus_login')
97
- self.chorus_login = attributes[:'chorus_login']
100
+ if attributes.key?(:'chorus_pro_login')
101
+ self.chorus_pro_login = attributes[:'chorus_pro_login']
102
+ else
103
+ self.chorus_pro_login = nil
98
104
  end
99
105
 
100
- if attributes.key?(:'chorus_password')
101
- self.chorus_password = attributes[:'chorus_password']
106
+ if attributes.key?(:'chorus_pro_password')
107
+ self.chorus_pro_password = attributes[:'chorus_pro_password']
108
+ else
109
+ self.chorus_pro_password = nil
102
110
  end
103
111
 
104
- if attributes.key?(:'sandbox_mode')
105
- self.sandbox_mode = attributes[:'sandbox_mode']
112
+ if attributes.key?(:'sandbox')
113
+ self.sandbox = attributes[:'sandbox']
106
114
  else
107
- self.sandbox_mode = true
115
+ self.sandbox = true
108
116
  end
109
117
  end
110
118
 
@@ -113,6 +121,22 @@ module FactPulse
113
121
  def list_invalid_properties
114
122
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
123
  invalid_properties = Array.new
124
+ if @piste_client_id.nil?
125
+ invalid_properties.push('invalid value for "piste_client_id", piste_client_id cannot be nil.')
126
+ end
127
+
128
+ if @piste_client_secret.nil?
129
+ invalid_properties.push('invalid value for "piste_client_secret", piste_client_secret cannot be nil.')
130
+ end
131
+
132
+ if @chorus_pro_login.nil?
133
+ invalid_properties.push('invalid value for "chorus_pro_login", chorus_pro_login cannot be nil.')
134
+ end
135
+
136
+ if @chorus_pro_password.nil?
137
+ invalid_properties.push('invalid value for "chorus_pro_password", chorus_pro_password cannot be nil.')
138
+ end
139
+
116
140
  invalid_properties
117
141
  end
118
142
 
@@ -120,9 +144,53 @@ module FactPulse
120
144
  # @return true if the model is valid
121
145
  def valid?
122
146
  warn '[DEPRECATED] the `valid?` method is obsolete'
147
+ return false if @piste_client_id.nil?
148
+ return false if @piste_client_secret.nil?
149
+ return false if @chorus_pro_login.nil?
150
+ return false if @chorus_pro_password.nil?
123
151
  true
124
152
  end
125
153
 
154
+ # Custom attribute writer method with validation
155
+ # @param [Object] piste_client_id Value to be assigned
156
+ def piste_client_id=(piste_client_id)
157
+ if piste_client_id.nil?
158
+ fail ArgumentError, 'piste_client_id cannot be nil'
159
+ end
160
+
161
+ @piste_client_id = piste_client_id
162
+ end
163
+
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] piste_client_secret Value to be assigned
166
+ def piste_client_secret=(piste_client_secret)
167
+ if piste_client_secret.nil?
168
+ fail ArgumentError, 'piste_client_secret cannot be nil'
169
+ end
170
+
171
+ @piste_client_secret = piste_client_secret
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] chorus_pro_login Value to be assigned
176
+ def chorus_pro_login=(chorus_pro_login)
177
+ if chorus_pro_login.nil?
178
+ fail ArgumentError, 'chorus_pro_login cannot be nil'
179
+ end
180
+
181
+ @chorus_pro_login = chorus_pro_login
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] chorus_pro_password Value to be assigned
186
+ def chorus_pro_password=(chorus_pro_password)
187
+ if chorus_pro_password.nil?
188
+ fail ArgumentError, 'chorus_pro_password cannot be nil'
189
+ end
190
+
191
+ @chorus_pro_password = chorus_pro_password
192
+ end
193
+
126
194
  # Checks equality by comparing each attribute.
127
195
  # @param [Object] Object to be compared
128
196
  def ==(o)
@@ -130,9 +198,9 @@ module FactPulse
130
198
  self.class == o.class &&
131
199
  piste_client_id == o.piste_client_id &&
132
200
  piste_client_secret == o.piste_client_secret &&
133
- chorus_login == o.chorus_login &&
134
- chorus_password == o.chorus_password &&
135
- sandbox_mode == o.sandbox_mode
201
+ chorus_pro_login == o.chorus_pro_login &&
202
+ chorus_pro_password == o.chorus_pro_password &&
203
+ sandbox == o.sandbox
136
204
  end
137
205
 
138
206
  # @see the `==` method
@@ -144,7 +212,7 @@ module FactPulse
144
212
  # Calculates hash code according to all attributes.
145
213
  # @return [Integer] Hash code
146
214
  def hash
147
- [piste_client_id, piste_client_secret, chorus_login, chorus_password, sandbox_mode].hash
215
+ [piste_client_id, piste_client_secret, chorus_pro_login, chorus_pro_password, sandbox].hash
148
216
  end
149
217
 
150
218
  # Builds the object from hash
@@ -64,7 +64,7 @@ module FactPulse
64
64
  def self.openapi_types
65
65
  {
66
66
  :'type' => :'String',
67
- :'credentials' => :'ChorusProCredentials'
67
+ :'credentials' => :'FactureElectroniqueRestApiSchemasProcessingChorusProCredentials'
68
68
  }
69
69
  end
70
70
 
@@ -14,15 +14,26 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Response for validation errors.
18
- class FactureElectroniqueRestApiSchemasValidationValidationErrorResponse < ApiModelBase
19
- # List of detected validation errors.
20
- attr_accessor :detail
17
+ # Erreur de validation.
18
+ class FactureElectroniqueRestApiSchemasCdarValidationErrorResponse < ApiModelBase
19
+ # Champ concerné
20
+ attr_accessor :field
21
+
22
+ # Message d'erreur
23
+ attr_accessor :message
24
+
25
+ attr_accessor :rule
26
+
27
+ # Sévérité (error/warning)
28
+ attr_accessor :severity
21
29
 
22
30
  # Attribute mapping from ruby-style variable name to JSON key.
23
31
  def self.attribute_map
24
32
  {
25
- :'detail' => :'detail'
33
+ :'field' => :'field',
34
+ :'message' => :'message',
35
+ :'rule' => :'rule',
36
+ :'severity' => :'severity'
26
37
  }
27
38
  end
28
39
 
@@ -39,13 +50,17 @@ module FactPulse
39
50
  # Attribute type mapping.
40
51
  def self.openapi_types
41
52
  {
42
- :'detail' => :'Array<String>'
53
+ :'field' => :'String',
54
+ :'message' => :'String',
55
+ :'rule' => :'String',
56
+ :'severity' => :'String'
43
57
  }
44
58
  end
45
59
 
46
60
  # List of attributes with nullable: true
47
61
  def self.openapi_nullable
48
62
  Set.new([
63
+ :'rule',
49
64
  ])
50
65
  end
51
66
 
@@ -53,24 +68,38 @@ module FactPulse
53
68
  # @param [Hash] attributes Model attributes in the form of hash
54
69
  def initialize(attributes = {})
55
70
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse` initialize method"
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse` initialize method"
57
72
  end
58
73
 
59
74
  # check to see if the attribute exists and convert string to symbol for hash key
60
75
  acceptable_attribute_map = self.class.acceptable_attribute_map
61
76
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
77
  if (!acceptable_attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
79
  end
65
80
  h[k.to_sym] = v
66
81
  }
67
82
 
68
- if attributes.key?(:'detail')
69
- if (value = attributes[:'detail']).is_a?(Array)
70
- self.detail = value
71
- end
83
+ if attributes.key?(:'field')
84
+ self.field = attributes[:'field']
85
+ else
86
+ self.field = nil
87
+ end
88
+
89
+ if attributes.key?(:'message')
90
+ self.message = attributes[:'message']
72
91
  else
73
- self.detail = nil
92
+ self.message = nil
93
+ end
94
+
95
+ if attributes.key?(:'rule')
96
+ self.rule = attributes[:'rule']
97
+ end
98
+
99
+ if attributes.key?(:'severity')
100
+ self.severity = attributes[:'severity']
101
+ else
102
+ self.severity = 'error'
74
103
  end
75
104
  end
76
105
 
@@ -79,8 +108,12 @@ module FactPulse
79
108
  def list_invalid_properties
80
109
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
110
  invalid_properties = Array.new
82
- if @detail.nil?
83
- invalid_properties.push('invalid value for "detail", detail cannot be nil.')
111
+ if @field.nil?
112
+ invalid_properties.push('invalid value for "field", field cannot be nil.')
113
+ end
114
+
115
+ if @message.nil?
116
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
84
117
  end
85
118
 
86
119
  invalid_properties
@@ -90,18 +123,29 @@ module FactPulse
90
123
  # @return true if the model is valid
91
124
  def valid?
92
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
93
- return false if @detail.nil?
126
+ return false if @field.nil?
127
+ return false if @message.nil?
94
128
  true
95
129
  end
96
130
 
97
131
  # Custom attribute writer method with validation
98
- # @param [Object] detail Value to be assigned
99
- def detail=(detail)
100
- if detail.nil?
101
- fail ArgumentError, 'detail cannot be nil'
132
+ # @param [Object] field Value to be assigned
133
+ def field=(field)
134
+ if field.nil?
135
+ fail ArgumentError, 'field cannot be nil'
136
+ end
137
+
138
+ @field = field
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] message Value to be assigned
143
+ def message=(message)
144
+ if message.nil?
145
+ fail ArgumentError, 'message cannot be nil'
102
146
  end
103
147
 
104
- @detail = detail
148
+ @message = message
105
149
  end
106
150
 
107
151
  # Checks equality by comparing each attribute.
@@ -109,7 +153,10 @@ module FactPulse
109
153
  def ==(o)
110
154
  return true if self.equal?(o)
111
155
  self.class == o.class &&
112
- detail == o.detail
156
+ field == o.field &&
157
+ message == o.message &&
158
+ rule == o.rule &&
159
+ severity == o.severity
113
160
  end
114
161
 
115
162
  # @see the `==` method
@@ -121,7 +168,7 @@ module FactPulse
121
168
  # Calculates hash code according to all attributes.
122
169
  # @return [Integer] Hash code
123
170
  def hash
124
- [detail].hash
171
+ [field, message, rule, severity].hash
125
172
  end
126
173
 
127
174
  # Builds the object from hash