factpulse 4.0.2 → 4.0.3

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -4
  3. data/Gemfile.lock +2 -2
  4. data/README.md +12 -0
  5. data/docs/AFNORPDPPAApi.md +9 -2
  6. data/docs/AsyncTasksApi.md +6 -1
  7. data/docs/ChorusProApi.md +96 -16
  8. data/docs/ClientManagementApi.md +359 -13
  9. data/docs/ConvertResumeRequest.md +5 -1
  10. data/docs/DownloadsApi.md +12 -2
  11. data/docs/ElectronicSignatureApi.md +24 -4
  12. data/docs/FacturXConversionApi.md +101 -4
  13. data/docs/FacturXGenerationApi.md +18 -3
  14. data/docs/FacturXPDFXMLVerificationApi.md +18 -3
  15. data/docs/FacturXValidationApi.md +18 -3
  16. data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +18 -0
  17. data/docs/Flux10EReportingApi.md +36 -6
  18. data/docs/Flux6InvoiceLifecycleCDARApi.md +18 -3
  19. data/docs/HealthApi.md +6 -1
  20. data/docs/KeyRotationRequest.md +20 -0
  21. data/docs/KeyRotationResponse.md +24 -0
  22. data/docs/PDPConfigResponse.md +2 -0
  23. data/docs/PDPConfigUpdateRequest.md +3 -1
  24. data/docs/SecretStatus.md +5 -1
  25. data/docs/ValidateCDARResponse.md +2 -2
  26. data/docs/ValidationErrorResponse.md +8 -2
  27. data/docs/WebhookSecretDeleteResponse.md +20 -0
  28. data/docs/WebhookSecretGenerateResponse.md +24 -0
  29. data/docs/WebhookSecretStatusResponse.md +20 -0
  30. data/lib/factpulse/api/afnorpdppa_api.rb +4 -1
  31. data/lib/factpulse/api/async_tasks_api.rb +1 -1
  32. data/lib/factpulse/api/chorus_pro_api.rb +16 -16
  33. data/lib/factpulse/api/client_management_api.rb +276 -10
  34. data/lib/factpulse/api/downloads_api.rb +2 -2
  35. data/lib/factpulse/api/electronic_signature_api.rb +4 -4
  36. data/lib/factpulse/api/factur_x_conversion_api.rb +78 -4
  37. data/lib/factpulse/api/factur_x_generation_api.rb +3 -3
  38. data/lib/factpulse/api/factur_x_validation_api.rb +3 -3
  39. data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +3 -3
  40. data/lib/factpulse/api/flux10_e_reporting_api.rb +6 -6
  41. data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +3 -3
  42. data/lib/factpulse/api/health_api.rb +1 -1
  43. data/lib/factpulse/configuration.rb +7 -0
  44. data/lib/factpulse/models/convert_resume_request.rb +27 -5
  45. data/lib/factpulse/models/facture_electronique_rest_api_schemas_validation_validation_error_response.rb +168 -0
  46. data/lib/factpulse/models/key_rotation_request.rb +211 -0
  47. data/lib/factpulse/models/key_rotation_response.rb +232 -0
  48. data/lib/factpulse/models/pdp_config_response.rb +11 -1
  49. data/lib/factpulse/models/pdp_config_update_request.rb +49 -5
  50. data/lib/factpulse/models/secret_status.rb +24 -4
  51. data/lib/factpulse/models/validate_cdar_response.rb +2 -2
  52. data/lib/factpulse/models/validation_error_response.rb +67 -20
  53. data/lib/factpulse/models/{facture_electronique_rest_api_schemas_cdar_validation_error_response.rb → webhook_secret_delete_response.rb} +25 -47
  54. data/lib/factpulse/models/webhook_secret_generate_response.rb +247 -0
  55. data/lib/factpulse/models/webhook_secret_status_response.rb +176 -0
  56. data/lib/factpulse/version.rb +1 -1
  57. data/lib/factpulse.rb +6 -1
  58. metadata +14 -4
  59. data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +0 -24
@@ -22,11 +22,17 @@ module FactPulse
22
22
  # Descriptive status message
23
23
  attr_accessor :message
24
24
 
25
+ attr_accessor :encryption_mode
26
+
27
+ attr_accessor :requires_client_key
28
+
25
29
  # Attribute mapping from ruby-style variable name to JSON key.
26
30
  def self.attribute_map
27
31
  {
28
32
  :'status' => :'status',
29
- :'message' => :'message'
33
+ :'message' => :'message',
34
+ :'encryption_mode' => :'encryptionMode',
35
+ :'requires_client_key' => :'requiresClientKey'
30
36
  }
31
37
  end
32
38
 
@@ -44,13 +50,17 @@ module FactPulse
44
50
  def self.openapi_types
45
51
  {
46
52
  :'status' => :'String',
47
- :'message' => :'String'
53
+ :'message' => :'String',
54
+ :'encryption_mode' => :'String',
55
+ :'requires_client_key' => :'Boolean'
48
56
  }
49
57
  end
50
58
 
51
59
  # List of attributes with nullable: true
52
60
  def self.openapi_nullable
53
61
  Set.new([
62
+ :'encryption_mode',
63
+ :'requires_client_key'
54
64
  ])
55
65
  end
56
66
 
@@ -81,6 +91,14 @@ module FactPulse
81
91
  else
82
92
  self.message = nil
83
93
  end
94
+
95
+ if attributes.key?(:'encryption_mode')
96
+ self.encryption_mode = attributes[:'encryption_mode']
97
+ end
98
+
99
+ if attributes.key?(:'requires_client_key')
100
+ self.requires_client_key = attributes[:'requires_client_key']
101
+ end
84
102
  end
85
103
 
86
104
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -134,7 +152,9 @@ module FactPulse
134
152
  return true if self.equal?(o)
135
153
  self.class == o.class &&
136
154
  status == o.status &&
137
- message == o.message
155
+ message == o.message &&
156
+ encryption_mode == o.encryption_mode &&
157
+ requires_client_key == o.requires_client_key
138
158
  end
139
159
 
140
160
  # @see the `==` method
@@ -146,7 +166,7 @@ module FactPulse
146
166
  # Calculates hash code according to all attributes.
147
167
  # @return [Integer] Hash code
148
168
  def hash
149
- [status, message].hash
169
+ [status, message, encryption_mode, requires_client_key].hash
150
170
  end
151
171
 
152
172
  # Builds the object from hash
@@ -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
@@ -14,26 +14,19 @@ 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
17
+ # Response after deleting webhook secret.
18
+ class WebhookSecretDeleteResponse < ApiModelBase
19
+ # Whether the secret was deleted successfully
20
+ attr_accessor :success
21
21
 
22
- # Message d'erreur
22
+ # Result message
23
23
  attr_accessor :message
24
24
 
25
- attr_accessor :rule
26
-
27
- # Sévérité (error/warning)
28
- attr_accessor :severity
29
-
30
25
  # Attribute mapping from ruby-style variable name to JSON key.
31
26
  def self.attribute_map
32
27
  {
33
- :'field' => :'field',
34
- :'message' => :'message',
35
- :'rule' => :'rule',
36
- :'severity' => :'severity'
28
+ :'success' => :'success',
29
+ :'message' => :'message'
37
30
  }
38
31
  end
39
32
 
@@ -50,17 +43,14 @@ module FactPulse
50
43
  # Attribute type mapping.
51
44
  def self.openapi_types
52
45
  {
53
- :'field' => :'String',
54
- :'message' => :'String',
55
- :'rule' => :'String',
56
- :'severity' => :'String'
46
+ :'success' => :'Boolean',
47
+ :'message' => :'String'
57
48
  }
58
49
  end
59
50
 
60
51
  # List of attributes with nullable: true
61
52
  def self.openapi_nullable
62
53
  Set.new([
63
- :'rule',
64
54
  ])
65
55
  end
66
56
 
@@ -68,22 +58,22 @@ module FactPulse
68
58
  # @param [Hash] attributes Model attributes in the form of hash
69
59
  def initialize(attributes = {})
70
60
  if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasCdarValidationErrorResponse` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::WebhookSecretDeleteResponse` initialize method"
72
62
  end
73
63
 
74
64
  # check to see if the attribute exists and convert string to symbol for hash key
75
65
  acceptable_attribute_map = self.class.acceptable_attribute_map
76
66
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
67
  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
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::WebhookSecretDeleteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
69
  end
80
70
  h[k.to_sym] = v
81
71
  }
82
72
 
83
- if attributes.key?(:'field')
84
- self.field = attributes[:'field']
73
+ if attributes.key?(:'success')
74
+ self.success = attributes[:'success']
85
75
  else
86
- self.field = nil
76
+ self.success = nil
87
77
  end
88
78
 
89
79
  if attributes.key?(:'message')
@@ -91,16 +81,6 @@ module FactPulse
91
81
  else
92
82
  self.message = nil
93
83
  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'
103
- end
104
84
  end
105
85
 
106
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,8 +88,8 @@ module FactPulse
108
88
  def list_invalid_properties
109
89
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
90
  invalid_properties = Array.new
111
- if @field.nil?
112
- invalid_properties.push('invalid value for "field", field cannot be nil.')
91
+ if @success.nil?
92
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
113
93
  end
114
94
 
115
95
  if @message.nil?
@@ -123,19 +103,19 @@ module FactPulse
123
103
  # @return true if the model is valid
124
104
  def valid?
125
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
- return false if @field.nil?
106
+ return false if @success.nil?
127
107
  return false if @message.nil?
128
108
  true
129
109
  end
130
110
 
131
111
  # 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'
112
+ # @param [Object] success Value to be assigned
113
+ def success=(success)
114
+ if success.nil?
115
+ fail ArgumentError, 'success cannot be nil'
136
116
  end
137
117
 
138
- @field = field
118
+ @success = success
139
119
  end
140
120
 
141
121
  # Custom attribute writer method with validation
@@ -153,10 +133,8 @@ module FactPulse
153
133
  def ==(o)
154
134
  return true if self.equal?(o)
155
135
  self.class == o.class &&
156
- field == o.field &&
157
- message == o.message &&
158
- rule == o.rule &&
159
- severity == o.severity
136
+ success == o.success &&
137
+ message == o.message
160
138
  end
161
139
 
162
140
  # @see the `==` method
@@ -168,7 +146,7 @@ module FactPulse
168
146
  # Calculates hash code according to all attributes.
169
147
  # @return [Integer] Hash code
170
148
  def hash
171
- [field, message, rule, severity].hash
149
+ [success, message].hash
172
150
  end
173
151
 
174
152
  # Builds the object from hash
@@ -0,0 +1,247 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X - Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Factur-X - Validation - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) ### ✍️ Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification ### 📋 Flux 6 - Invoice Lifecycle (CDAR) - **CDAR Messages**: Acknowledgements, invoice statuses - **PPF Statuses**: REFUSED (210), PAID (212) ### 📊 Flux 10 - E-Reporting - **Tax Declarations**: International B2B, B2C - **Flow Types**: 10.1 (B2B transactions), 10.2 (B2B payments), 10.3 (B2C transactions), 10.4 (B2C payments) ### 📡 AFNOR PDP/PA (XP Z12-013) - **Flow Service**: Submit and search flows to PDPs - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user ### 🏛️ Chorus Pro - **Public Sector Invoicing**: Complete API for Chorus Pro ### ⏳ Async Tasks - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **Webhooks**: Automatic notifications when tasks complete ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: contact@factpulse.fr
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.20.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Response after generating a webhook secret.
18
+ class WebhookSecretGenerateResponse < ApiModelBase
19
+ # Whether the secret was generated successfully
20
+ attr_accessor :success
21
+
22
+ # The generated webhook secret (save it, it will never be shown again)
23
+ attr_accessor :webhook_secret
24
+
25
+ # Result message
26
+ attr_accessor :message
27
+
28
+ # When the secret was created
29
+ attr_accessor :created_at
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'success' => :'success',
35
+ :'webhook_secret' => :'webhookSecret',
36
+ :'message' => :'message',
37
+ :'created_at' => :'createdAt'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'success' => :'Boolean',
55
+ :'webhook_secret' => :'String',
56
+ :'message' => :'String',
57
+ :'created_at' => :'Time'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::WebhookSecretGenerateResponse` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::WebhookSecretGenerateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'success')
84
+ self.success = attributes[:'success']
85
+ else
86
+ self.success = nil
87
+ end
88
+
89
+ if attributes.key?(:'webhook_secret')
90
+ self.webhook_secret = attributes[:'webhook_secret']
91
+ else
92
+ self.webhook_secret = nil
93
+ end
94
+
95
+ if attributes.key?(:'message')
96
+ self.message = attributes[:'message']
97
+ else
98
+ self.message = nil
99
+ end
100
+
101
+ if attributes.key?(:'created_at')
102
+ self.created_at = attributes[:'created_at']
103
+ else
104
+ self.created_at = nil
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @success.nil?
114
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
115
+ end
116
+
117
+ if @webhook_secret.nil?
118
+ invalid_properties.push('invalid value for "webhook_secret", webhook_secret cannot be nil.')
119
+ end
120
+
121
+ if @message.nil?
122
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
123
+ end
124
+
125
+ if @created_at.nil?
126
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
127
+ end
128
+
129
+ invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
+ return false if @success.nil?
137
+ return false if @webhook_secret.nil?
138
+ return false if @message.nil?
139
+ return false if @created_at.nil?
140
+ true
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] success Value to be assigned
145
+ def success=(success)
146
+ if success.nil?
147
+ fail ArgumentError, 'success cannot be nil'
148
+ end
149
+
150
+ @success = success
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] webhook_secret Value to be assigned
155
+ def webhook_secret=(webhook_secret)
156
+ if webhook_secret.nil?
157
+ fail ArgumentError, 'webhook_secret cannot be nil'
158
+ end
159
+
160
+ @webhook_secret = webhook_secret
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] message Value to be assigned
165
+ def message=(message)
166
+ if message.nil?
167
+ fail ArgumentError, 'message cannot be nil'
168
+ end
169
+
170
+ @message = message
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] created_at Value to be assigned
175
+ def created_at=(created_at)
176
+ if created_at.nil?
177
+ fail ArgumentError, 'created_at cannot be nil'
178
+ end
179
+
180
+ @created_at = created_at
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ success == o.success &&
189
+ webhook_secret == o.webhook_secret &&
190
+ message == o.message &&
191
+ created_at == o.created_at
192
+ end
193
+
194
+ # @see the `==` method
195
+ # @param [Object] Object to be compared
196
+ def eql?(o)
197
+ self == o
198
+ end
199
+
200
+ # Calculates hash code according to all attributes.
201
+ # @return [Integer] Hash code
202
+ def hash
203
+ [success, webhook_secret, message, created_at].hash
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def self.build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ attributes = attributes.transform_keys(&:to_sym)
212
+ transformed_hash = {}
213
+ openapi_types.each_pair do |key, type|
214
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[attribute_map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
221
+ end
222
+ elsif !attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
224
+ end
225
+ end
226
+ new(transformed_hash)
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ end
246
+
247
+ end