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
|
@@ -14,31 +14,27 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
# Chorus Pro credentials
|
|
18
|
-
class
|
|
19
|
-
# PISTE Client ID (government API portal)
|
|
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.
|
|
18
|
+
class FactureElectroniqueRestApiSchemasProcessingChorusProCredentials < ApiModelBase
|
|
20
19
|
attr_accessor :piste_client_id
|
|
21
20
|
|
|
22
|
-
# PISTE Client Secret
|
|
23
21
|
attr_accessor :piste_client_secret
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
attr_accessor :chorus_pro_login
|
|
23
|
+
attr_accessor :chorus_login
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
attr_accessor :chorus_pro_password
|
|
25
|
+
attr_accessor :chorus_password
|
|
30
26
|
|
|
31
|
-
# Use sandbox
|
|
32
|
-
attr_accessor :
|
|
27
|
+
# [MODE 2] Use sandbox mode (default: True)
|
|
28
|
+
attr_accessor :sandbox_mode
|
|
33
29
|
|
|
34
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
31
|
def self.attribute_map
|
|
36
32
|
{
|
|
37
33
|
:'piste_client_id' => :'pisteClientId',
|
|
38
34
|
:'piste_client_secret' => :'pisteClientSecret',
|
|
39
|
-
:'
|
|
40
|
-
:'
|
|
41
|
-
:'
|
|
35
|
+
:'chorus_login' => :'chorusLogin',
|
|
36
|
+
:'chorus_password' => :'chorusPassword',
|
|
37
|
+
:'sandbox_mode' => :'sandboxMode'
|
|
42
38
|
}
|
|
43
39
|
end
|
|
44
40
|
|
|
@@ -57,15 +53,19 @@ module FactPulse
|
|
|
57
53
|
{
|
|
58
54
|
:'piste_client_id' => :'String',
|
|
59
55
|
:'piste_client_secret' => :'String',
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
62
|
-
:'
|
|
56
|
+
:'chorus_login' => :'String',
|
|
57
|
+
:'chorus_password' => :'String',
|
|
58
|
+
:'sandbox_mode' => :'Boolean'
|
|
63
59
|
}
|
|
64
60
|
end
|
|
65
61
|
|
|
66
62
|
# List of attributes with nullable: true
|
|
67
63
|
def self.openapi_nullable
|
|
68
64
|
Set.new([
|
|
65
|
+
:'piste_client_id',
|
|
66
|
+
:'piste_client_secret',
|
|
67
|
+
:'chorus_login',
|
|
68
|
+
:'chorus_password',
|
|
69
69
|
])
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -73,46 +73,38 @@ module FactPulse
|
|
|
73
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
74
|
def initialize(attributes = {})
|
|
75
75
|
if (!attributes.is_a?(Hash))
|
|
76
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasProcessingChorusProCredentials` initialize method"
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
80
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
81
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
82
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FactureElectroniqueRestApiSchemasProcessingChorusProCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
84
|
end
|
|
85
85
|
h[k.to_sym] = v
|
|
86
86
|
}
|
|
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
|
|
92
90
|
end
|
|
93
91
|
|
|
94
92
|
if attributes.key?(:'piste_client_secret')
|
|
95
93
|
self.piste_client_secret = attributes[:'piste_client_secret']
|
|
96
|
-
else
|
|
97
|
-
self.piste_client_secret = nil
|
|
98
94
|
end
|
|
99
95
|
|
|
100
|
-
if attributes.key?(:'
|
|
101
|
-
self.
|
|
102
|
-
else
|
|
103
|
-
self.chorus_pro_login = nil
|
|
96
|
+
if attributes.key?(:'chorus_login')
|
|
97
|
+
self.chorus_login = attributes[:'chorus_login']
|
|
104
98
|
end
|
|
105
99
|
|
|
106
|
-
if attributes.key?(:'
|
|
107
|
-
self.
|
|
108
|
-
else
|
|
109
|
-
self.chorus_pro_password = nil
|
|
100
|
+
if attributes.key?(:'chorus_password')
|
|
101
|
+
self.chorus_password = attributes[:'chorus_password']
|
|
110
102
|
end
|
|
111
103
|
|
|
112
|
-
if attributes.key?(:'
|
|
113
|
-
self.
|
|
104
|
+
if attributes.key?(:'sandbox_mode')
|
|
105
|
+
self.sandbox_mode = attributes[:'sandbox_mode']
|
|
114
106
|
else
|
|
115
|
-
self.
|
|
107
|
+
self.sandbox_mode = true
|
|
116
108
|
end
|
|
117
109
|
end
|
|
118
110
|
|
|
@@ -121,22 +113,6 @@ module FactPulse
|
|
|
121
113
|
def list_invalid_properties
|
|
122
114
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
115
|
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
|
-
|
|
140
116
|
invalid_properties
|
|
141
117
|
end
|
|
142
118
|
|
|
@@ -144,53 +120,9 @@ module FactPulse
|
|
|
144
120
|
# @return true if the model is valid
|
|
145
121
|
def valid?
|
|
146
122
|
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?
|
|
151
123
|
true
|
|
152
124
|
end
|
|
153
125
|
|
|
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
|
-
|
|
194
126
|
# Checks equality by comparing each attribute.
|
|
195
127
|
# @param [Object] Object to be compared
|
|
196
128
|
def ==(o)
|
|
@@ -198,9 +130,9 @@ module FactPulse
|
|
|
198
130
|
self.class == o.class &&
|
|
199
131
|
piste_client_id == o.piste_client_id &&
|
|
200
132
|
piste_client_secret == o.piste_client_secret &&
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
133
|
+
chorus_login == o.chorus_login &&
|
|
134
|
+
chorus_password == o.chorus_password &&
|
|
135
|
+
sandbox_mode == o.sandbox_mode
|
|
204
136
|
end
|
|
205
137
|
|
|
206
138
|
# @see the `==` method
|
|
@@ -212,7 +144,7 @@ module FactPulse
|
|
|
212
144
|
# Calculates hash code according to all attributes.
|
|
213
145
|
# @return [Integer] Hash code
|
|
214
146
|
def hash
|
|
215
|
-
[piste_client_id, piste_client_secret,
|
|
147
|
+
[piste_client_id, piste_client_secret, chorus_login, chorus_password, sandbox_mode].hash
|
|
216
148
|
end
|
|
217
149
|
|
|
218
150
|
# Builds the object from hash
|
|
@@ -46,7 +46,7 @@ module FactPulse
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'credentials' => :'
|
|
49
|
+
:'credentials' => :'ChorusProCredentials',
|
|
50
50
|
:'siret' => :'String',
|
|
51
51
|
:'identifier_type' => :'String'
|
|
52
52
|
}
|
|
@@ -42,7 +42,7 @@ module FactPulse
|
|
|
42
42
|
# Attribute type mapping.
|
|
43
43
|
def self.openapi_types
|
|
44
44
|
{
|
|
45
|
-
:'credentials' => :'
|
|
45
|
+
:'credentials' => :'ChorusProCredentials',
|
|
46
46
|
:'chorus_invoice_id' => :'Integer'
|
|
47
47
|
}
|
|
48
48
|
end
|
|
@@ -46,7 +46,7 @@ module FactPulse
|
|
|
46
46
|
# Attribute type mapping.
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'credentials' => :'
|
|
49
|
+
:'credentials' => :'ChorusProCredentials',
|
|
50
50
|
:'structure_id' => :'Integer',
|
|
51
51
|
:'language_code' => :'String'
|
|
52
52
|
}
|
|
@@ -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
|
|
@@ -15,9 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
17
|
class SchemeID
|
|
18
|
-
|
|
18
|
+
FR_ELECTRONIC_ADDRESS = "0225".freeze
|
|
19
|
+
FR_SIREN = "0002".freeze
|
|
19
20
|
FR_SIRET = "0009".freeze
|
|
20
|
-
FR_SIREN_OLD = "0002".freeze
|
|
21
21
|
GLN = "0088".freeze
|
|
22
22
|
DUNS = "0060".freeze
|
|
23
23
|
FR_VAT_INTRA = "9957".freeze
|
|
@@ -35,7 +35,7 @@ module FactPulse
|
|
|
35
35
|
PT_VAT = "9934".freeze
|
|
36
36
|
|
|
37
37
|
def self.all_vars
|
|
38
|
-
@all_vars ||= [FR_SIREN, FR_SIRET,
|
|
38
|
+
@all_vars ||= [FR_ELECTRONIC_ADDRESS, FR_SIREN, FR_SIRET, GLN, DUNS, FR_VAT_INTRA, GLEIF, DT_DIRECTORY_ID, EMAIL, ODETTE, FR_CHORUS_PRO_ROUTING, DE_VAT, AT_VAT, BE_VAT, ES_VAT, IT_VAT, NL_VAT, PT_VAT].freeze
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
# Builds the enum from string
|
|
@@ -51,7 +51,7 @@ module FactPulse
|
|
|
51
51
|
# Attribute type mapping.
|
|
52
52
|
def self.openapi_types
|
|
53
53
|
{
|
|
54
|
-
:'credentials' => :'
|
|
54
|
+
:'credentials' => :'ChorusProCredentials',
|
|
55
55
|
:'structure_identifier' => :'String',
|
|
56
56
|
:'structure_identifier_type' => :'String',
|
|
57
57
|
:'company_name' => :'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'
|
|
@@ -35,7 +35,7 @@ module FactPulse
|
|
|
35
35
|
attr_accessor :signature
|
|
36
36
|
|
|
37
37
|
# Generated Factur-X PDF (and signed if requested) base64-encoded
|
|
38
|
-
attr_accessor :
|
|
38
|
+
attr_accessor :content_b64
|
|
39
39
|
|
|
40
40
|
# Return message
|
|
41
41
|
attr_accessor :message
|
|
@@ -72,7 +72,7 @@ module FactPulse
|
|
|
72
72
|
:'enriched_invoice' => :'enrichedInvoice',
|
|
73
73
|
:'facturx_pdf' => :'facturxPdf',
|
|
74
74
|
:'signature' => :'signature',
|
|
75
|
-
:'
|
|
75
|
+
:'content_b64' => :'contentB64',
|
|
76
76
|
:'message' => :'message'
|
|
77
77
|
}
|
|
78
78
|
end
|
|
@@ -97,7 +97,7 @@ module FactPulse
|
|
|
97
97
|
:'enriched_invoice' => :'EnrichedInvoiceInfo',
|
|
98
98
|
:'facturx_pdf' => :'FacturXPDFInfo',
|
|
99
99
|
:'signature' => :'SignatureInfo',
|
|
100
|
-
:'
|
|
100
|
+
:'content_b64' => :'String',
|
|
101
101
|
:'message' => :'String'
|
|
102
102
|
}
|
|
103
103
|
end
|
|
@@ -163,10 +163,10 @@ module FactPulse
|
|
|
163
163
|
self.signature = attributes[:'signature']
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
-
if attributes.key?(:'
|
|
167
|
-
self.
|
|
166
|
+
if attributes.key?(:'content_b64')
|
|
167
|
+
self.content_b64 = attributes[:'content_b64']
|
|
168
168
|
else
|
|
169
|
-
self.
|
|
169
|
+
self.content_b64 = nil
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
if attributes.key?(:'message')
|
|
@@ -197,8 +197,8 @@ module FactPulse
|
|
|
197
197
|
invalid_properties.push('invalid value for "facturx_pdf", facturx_pdf cannot be nil.')
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
-
if @
|
|
201
|
-
invalid_properties.push('invalid value for "
|
|
200
|
+
if @content_b64.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "content_b64", content_b64 cannot be nil.')
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
if @message.nil?
|
|
@@ -218,7 +218,7 @@ module FactPulse
|
|
|
218
218
|
return false unless destination_type_validator.valid?(@destination_type)
|
|
219
219
|
return false if @enriched_invoice.nil?
|
|
220
220
|
return false if @facturx_pdf.nil?
|
|
221
|
-
return false if @
|
|
221
|
+
return false if @content_b64.nil?
|
|
222
222
|
return false if @message.nil?
|
|
223
223
|
true
|
|
224
224
|
end
|
|
@@ -264,13 +264,13 @@ module FactPulse
|
|
|
264
264
|
end
|
|
265
265
|
|
|
266
266
|
# Custom attribute writer method with validation
|
|
267
|
-
# @param [Object]
|
|
268
|
-
def
|
|
269
|
-
if
|
|
270
|
-
fail ArgumentError, '
|
|
267
|
+
# @param [Object] content_b64 Value to be assigned
|
|
268
|
+
def content_b64=(content_b64)
|
|
269
|
+
if content_b64.nil?
|
|
270
|
+
fail ArgumentError, 'content_b64 cannot be nil'
|
|
271
271
|
end
|
|
272
272
|
|
|
273
|
-
@
|
|
273
|
+
@content_b64 = content_b64
|
|
274
274
|
end
|
|
275
275
|
|
|
276
276
|
# Custom attribute writer method with validation
|
|
@@ -295,7 +295,7 @@ module FactPulse
|
|
|
295
295
|
enriched_invoice == o.enriched_invoice &&
|
|
296
296
|
facturx_pdf == o.facturx_pdf &&
|
|
297
297
|
signature == o.signature &&
|
|
298
|
-
|
|
298
|
+
content_b64 == o.content_b64 &&
|
|
299
299
|
message == o.message
|
|
300
300
|
end
|
|
301
301
|
|
|
@@ -308,7 +308,7 @@ module FactPulse
|
|
|
308
308
|
# Calculates hash code according to all attributes.
|
|
309
309
|
# @return [Integer] Hash code
|
|
310
310
|
def hash
|
|
311
|
-
[success, destination_type, chorus_result, afnor_result, enriched_invoice, facturx_pdf, signature,
|
|
311
|
+
[success, destination_type, chorus_result, afnor_result, enriched_invoice, facturx_pdf, signature, content_b64, message].hash
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
# Builds the object from hash
|
|
@@ -83,7 +83,7 @@ module FactPulse
|
|
|
83
83
|
# Attribute type mapping.
|
|
84
84
|
def self.openapi_types
|
|
85
85
|
{
|
|
86
|
-
:'credentials' => :'
|
|
86
|
+
:'credentials' => :'ChorusProCredentials',
|
|
87
87
|
:'invoice_number' => :'String',
|
|
88
88
|
:'invoice_date' => :'String',
|
|
89
89
|
:'payment_due_date' => :'String',
|
|
@@ -48,8 +48,8 @@ module FactPulse
|
|
|
48
48
|
def self.openapi_types
|
|
49
49
|
{
|
|
50
50
|
:'valid' => :'Boolean',
|
|
51
|
-
:'errors' => :'Array<
|
|
52
|
-
:'warnings' => :'Array<
|
|
51
|
+
:'errors' => :'Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>',
|
|
52
|
+
:'warnings' => :'Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>'
|
|
53
53
|
}
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -14,26 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
#
|
|
17
|
+
# Response for validation errors.
|
|
18
18
|
class ValidationErrorResponse < ApiModelBase
|
|
19
|
-
#
|
|
20
|
-
attr_accessor :
|
|
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
|
|
19
|
+
# List of detected validation errors.
|
|
20
|
+
attr_accessor :detail
|
|
29
21
|
|
|
30
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
23
|
def self.attribute_map
|
|
32
24
|
{
|
|
33
|
-
:'
|
|
34
|
-
:'message' => :'message',
|
|
35
|
-
:'rule' => :'rule',
|
|
36
|
-
:'severity' => :'severity'
|
|
25
|
+
:'detail' => :'detail'
|
|
37
26
|
}
|
|
38
27
|
end
|
|
39
28
|
|
|
@@ -50,17 +39,13 @@ module FactPulse
|
|
|
50
39
|
# Attribute type mapping.
|
|
51
40
|
def self.openapi_types
|
|
52
41
|
{
|
|
53
|
-
:'
|
|
54
|
-
:'message' => :'String',
|
|
55
|
-
:'rule' => :'String',
|
|
56
|
-
:'severity' => :'String'
|
|
42
|
+
:'detail' => :'Array<String>'
|
|
57
43
|
}
|
|
58
44
|
end
|
|
59
45
|
|
|
60
46
|
# List of attributes with nullable: true
|
|
61
47
|
def self.openapi_nullable
|
|
62
48
|
Set.new([
|
|
63
|
-
:'rule',
|
|
64
49
|
])
|
|
65
50
|
end
|
|
66
51
|
|
|
@@ -80,26 +65,12 @@ module FactPulse
|
|
|
80
65
|
h[k.to_sym] = v
|
|
81
66
|
}
|
|
82
67
|
|
|
83
|
-
if attributes.key?(:'
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
if attributes.key?(:'message')
|
|
90
|
-
self.message = attributes[:'message']
|
|
91
|
-
else
|
|
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']
|
|
68
|
+
if attributes.key?(:'detail')
|
|
69
|
+
if (value = attributes[:'detail']).is_a?(Array)
|
|
70
|
+
self.detail = value
|
|
71
|
+
end
|
|
101
72
|
else
|
|
102
|
-
self.
|
|
73
|
+
self.detail = nil
|
|
103
74
|
end
|
|
104
75
|
end
|
|
105
76
|
|
|
@@ -108,12 +79,8 @@ module FactPulse
|
|
|
108
79
|
def list_invalid_properties
|
|
109
80
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
81
|
invalid_properties = Array.new
|
|
111
|
-
if @
|
|
112
|
-
invalid_properties.push('invalid value for "
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
if @message.nil?
|
|
116
|
-
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
82
|
+
if @detail.nil?
|
|
83
|
+
invalid_properties.push('invalid value for "detail", detail cannot be nil.')
|
|
117
84
|
end
|
|
118
85
|
|
|
119
86
|
invalid_properties
|
|
@@ -123,29 +90,18 @@ module FactPulse
|
|
|
123
90
|
# @return true if the model is valid
|
|
124
91
|
def valid?
|
|
125
92
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
-
return false if @
|
|
127
|
-
return false if @message.nil?
|
|
93
|
+
return false if @detail.nil?
|
|
128
94
|
true
|
|
129
95
|
end
|
|
130
96
|
|
|
131
97
|
# Custom attribute writer method with validation
|
|
132
|
-
# @param [Object]
|
|
133
|
-
def
|
|
134
|
-
if
|
|
135
|
-
fail ArgumentError, '
|
|
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'
|
|
98
|
+
# @param [Object] detail Value to be assigned
|
|
99
|
+
def detail=(detail)
|
|
100
|
+
if detail.nil?
|
|
101
|
+
fail ArgumentError, 'detail cannot be nil'
|
|
146
102
|
end
|
|
147
103
|
|
|
148
|
-
@
|
|
104
|
+
@detail = detail
|
|
149
105
|
end
|
|
150
106
|
|
|
151
107
|
# Checks equality by comparing each attribute.
|
|
@@ -153,10 +109,7 @@ module FactPulse
|
|
|
153
109
|
def ==(o)
|
|
154
110
|
return true if self.equal?(o)
|
|
155
111
|
self.class == o.class &&
|
|
156
|
-
|
|
157
|
-
message == o.message &&
|
|
158
|
-
rule == o.rule &&
|
|
159
|
-
severity == o.severity
|
|
112
|
+
detail == o.detail
|
|
160
113
|
end
|
|
161
114
|
|
|
162
115
|
# @see the `==` method
|
|
@@ -168,7 +121,7 @@ module FactPulse
|
|
|
168
121
|
# Calculates hash code according to all attributes.
|
|
169
122
|
# @return [Integer] Hash code
|
|
170
123
|
def hash
|
|
171
|
-
[
|
|
124
|
+
[detail].hash
|
|
172
125
|
end
|
|
173
126
|
|
|
174
127
|
# Builds the object from hash
|
data/lib/factpulse/version.rb
CHANGED
data/lib/factpulse.rb
CHANGED
|
@@ -165,9 +165,9 @@ 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/
|
|
169
|
-
require 'factpulse/models/
|
|
170
|
-
require 'factpulse/models/
|
|
168
|
+
require 'factpulse/models/facture_electronique_models_invoice_type_code'
|
|
169
|
+
require 'factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response'
|
|
170
|
+
require 'factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials'
|
|
171
171
|
require 'factpulse/models/field_status'
|
|
172
172
|
require 'factpulse/models/file_info'
|
|
173
173
|
require 'factpulse/models/files_info'
|