factpulse 3.0.34 → 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: eae78264ee3b2ac1f57aeb4e067dece096c2ecde9d822a9727029be8fcbae24e
4
- data.tar.gz: '07545528aead7e76703579aec585a5290281880ad24ce449aab9818cae17b39b'
3
+ metadata.gz: 477a27854ed3cda2c61b51c1d6ab4e832934b7f5e8dd433401390bb6f3872f47
4
+ data.tar.gz: 77f5c58390f8e725fcf6b203cc37fa10cefe8c6d556a30768ca9d81561643262
5
5
  SHA512:
6
- metadata.gz: c04efc02125978efa3eb6d7c00a4008ed55e4b649826195e50d86b67a6cd0521a65ad4314e2502df70cd8409af029f572ca2dd1c7a2772f7f9ad5d87df351366
7
- data.tar.gz: 9c2cce5e0b386d5d66a419f5644732f1f6f0118bff230e3d862b11b70cdd237498311df45a9142201770199f50b3bf2dcc316e0f7d4b03d0def3e43b535176da
6
+ metadata.gz: 3d352cfa56db2b0439511652a6be16fa38073da747dceed23f4d75965a44a0419b8dcab122f1a3686dec6ecd9e40f83b7ee3b855dfd86c8dd61d641611cf5b8d
7
+ data.tar.gz: 5268347f81ee0bd7976edb98cfa7f68724b6ed5ae8b31c6199db4a92fbf7fc7af8981fe84c2f344e4907f09f377ca7bd897ffdbce1d8d832d4822a23c6e36c21
data/CHANGELOG.md CHANGED
@@ -7,11 +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.34] - 2026-01-17
10
+ ## [3.0.35] - 2026-01-17
11
11
 
12
- ### Fixed
13
- - Gestion des erreurs métier (`result.status === "ERROR"`) dans tous les SDK - corrige l'erreur "No content" lors d'échecs de validation
12
+ ### Added
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
14
21
 
15
22
 
16
- [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v3.0.34...HEAD
17
- [3.0.34]: https://github.com/factpulse/sdk-ruby/releases/tag/v3.0.34
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.34)
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
+
@@ -0,0 +1,18 @@
1
+ # FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **Array<String>** | List of detected validation errors. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'factpulse'
13
+
14
+ instance = FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.new(
15
+ detail: null
16
+ )
17
+ ```
18
+
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] |
@@ -5,8 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **valid** | **Boolean** | Résultat de validation | |
8
- | **errors** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des erreurs | [optional] |
9
- | **warnings** | [**Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>**](FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md) | Liste des avertissements | [optional] |
8
+ | **errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des erreurs | [optional] |
9
+ | **warnings** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Liste des avertissements | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -4,7 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **detail** | **Array<String>** | List of detected validation errors. | |
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'] |
8
11
 
9
12
  ## Example
10
13
 
@@ -12,7 +15,10 @@
12
15
  require 'factpulse'
13
16
 
14
17
  instance = FactPulse::ValidationErrorResponse.new(
15
- detail: null
18
+ field: null,
19
+ message: null,
20
+ rule: null,
21
+ severity: null
16
22
  )
17
23
  ```
18
24
 
@@ -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' }
@@ -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
@@ -14,26 +14,15 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
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
17
+ # Response for validation errors.
18
+ class FactureElectroniqueRestApiSchemasValidationValidationErrorResponse < ApiModelBase
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
- :'field' => :'field',
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
- :'field' => :'String',
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
 
@@ -68,38 +53,24 @@ module FactPulse
68
53
  # @param [Hash] attributes Model attributes in the form of hash
69
54
  def initialize(attributes = {})
70
55
  if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse` initialize method"
72
57
  end
73
58
 
74
59
  # check to see if the attribute exists and convert string to symbol for hash key
75
60
  acceptable_attribute_map = self.class.acceptable_attribute_map
76
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
62
  if (!acceptable_attribute_map.key?(k.to_sym))
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
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
79
64
  end
80
65
  h[k.to_sym] = v
81
66
  }
82
67
 
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']
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.severity = 'error'
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 @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.')
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 @field.nil?
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] 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'
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
- @message = message
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
- field == o.field &&
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
- [field, message, rule, severity].hash
124
+ [detail].hash
172
125
  end
173
126
 
174
127
  # Builds the object from hash
@@ -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'
@@ -48,8 +48,8 @@ module FactPulse
48
48
  def self.openapi_types
49
49
  {
50
50
  :'valid' => :'Boolean',
51
- :'errors' => :'Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>',
52
- :'warnings' => :'Array<FactureElectroniqueRestApiSchemasCdarValidationErrorResponse>'
51
+ :'errors' => :'Array<ValidationErrorResponse>',
52
+ :'warnings' => :'Array<ValidationErrorResponse>'
53
53
  }
54
54
  end
55
55
 
@@ -14,15 +14,26 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Response for validation errors.
17
+ # Erreur de validation.
18
18
  class ValidationErrorResponse < ApiModelBase
19
- # List of detected validation errors.
20
- attr_accessor :detail
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
 
@@ -65,12 +80,26 @@ module FactPulse
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
@@ -11,5 +11,5 @@ Generator version: 7.19.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module FactPulse
14
- VERSION = '3.0.34'
14
+ VERSION = '3.0.35'
15
15
  end
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/facture_electronique_rest_api_schemas_cdar_validation_error_response'
168
+ require 'factpulse/models/facture_electronique_models_invoice_type_code'
169
169
  require 'factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials'
170
- require 'factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code'
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'
173
173
  require 'factpulse/models/files_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.34
4
+ version: 3.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -271,9 +271,9 @@ files:
271
271
  - docs/ExtractionInfo.md
272
272
  - docs/FacturXInvoice.md
273
273
  - docs/FacturXPDFInfo.md
274
- - docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md
274
+ - docs/FactureElectroniqueModelsInvoiceTypeCode.md
275
275
  - docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md
276
- - docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md
276
+ - docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md
277
277
  - docs/FieldStatus.md
278
278
  - docs/FileInfo.md
279
279
  - docs/FilesInfo.md
@@ -590,9 +590,9 @@ 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_rest_api_schemas_cdar_validation_error_response.rb
593
+ - lib/factpulse/models/facture_electronique_models_invoice_type_code.rb
594
594
  - lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb
595
- - lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb
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
598
598
  - lib/factpulse/models/files_info.rb
@@ -1,24 +0,0 @@
1
- # FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **field** | **String** | Champ concerné | |
8
- | **message** | **String** | Message d&#39;erreur | |
9
- | **rule** | **String** | | [optional] |
10
- | **severity** | **String** | Sévérité (error/warning) | [optional][default to &#39;error&#39;] |
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
-
@@ -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
-