budgea_client 1.4.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +67 -725
- data/budgea_client.gemspec +15 -3
- data/budgea_openapi.json +2011 -524
- data/docs/Account.md +3 -1
- data/docs/AccountLog.md +2 -2
- data/docs/AdministrationApi.md +354 -34
- data/docs/AuthenticationApi.md +264 -18
- data/docs/BankCategory.md +1 -1
- data/docs/BanksApi.md +939 -550
- data/docs/Certificate.md +12 -0
- data/docs/Client.md +5 -2
- data/docs/Connection.md +1 -1
- data/docs/ConnectionLog.md +3 -2
- data/docs/ConnectionsApi.md +162 -103
- data/docs/Connector.md +21 -0
- data/docs/ConnectorCategory.md +9 -0
- data/docs/ConnectorLogo.md +1 -1
- data/docs/Currency.md +4 -0
- data/docs/DocumentsApi.md +350 -350
- data/docs/Field.md +3 -2
- data/docs/InlineResponse20010.md +1 -1
- data/docs/InlineResponse20011.md +1 -1
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +1 -1
- data/docs/InlineResponse20014.md +1 -1
- data/docs/InlineResponse20015.md +1 -1
- data/docs/InlineResponse20016.md +1 -1
- data/docs/InlineResponse20017.md +1 -1
- data/docs/InlineResponse20018.md +1 -1
- data/docs/InlineResponse20019.md +1 -1
- data/docs/InlineResponse20020.md +1 -1
- data/docs/InlineResponse20021.md +1 -1
- data/docs/InlineResponse20022.md +1 -1
- data/docs/InlineResponse20023.md +1 -1
- data/docs/InlineResponse20024.md +1 -1
- data/docs/InlineResponse20025.md +1 -1
- data/docs/InlineResponse20026.md +1 -1
- data/docs/InlineResponse20027.md +1 -1
- data/docs/InlineResponse20028.md +1 -1
- data/docs/InlineResponse20029.md +1 -1
- data/docs/InlineResponse2003.md +2 -3
- data/docs/InlineResponse20030.md +1 -1
- data/docs/InlineResponse20031.md +1 -1
- data/docs/InlineResponse20032.md +1 -1
- data/docs/InlineResponse20033.md +1 -1
- data/docs/InlineResponse20034.md +8 -0
- data/docs/InlineResponse20035.md +8 -0
- data/docs/InlineResponse20036.md +8 -0
- data/docs/InlineResponse2004.md +0 -2
- data/docs/InlineResponse2005.md +5 -2
- data/docs/InlineResponse2006.md +2 -3
- data/docs/InlineResponse2007.md +3 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/OCRApi.md +5 -5
- data/docs/OIDCApi.md +5 -5
- data/docs/PFMApi.md +122 -122
- data/docs/Pocket.md +1 -1
- data/docs/Profile.md +1 -1
- data/docs/Project.md +1 -1
- data/docs/ProvidersApi.md +602 -604
- data/docs/Recipient.md +3 -0
- data/docs/RecipientLog.md +14 -0
- data/docs/RecipientsApi.md +28 -20
- data/docs/Subscription.md +2 -1
- data/docs/TermsApi.md +13 -15
- data/docs/Transaction.md +8 -3
- data/docs/Transfer.md +1 -0
- data/docs/TransferLog.md +14 -0
- data/docs/TransfersApi.md +165 -141
- data/docs/UserAlert.md +2 -2
- data/docs/UsersManagementApi.md +24 -24
- data/docs/WealthApi.md +54 -54
- data/docs/WebhookLog.md +15 -0
- data/lib/budgea_client.rb +27 -3
- data/lib/budgea_client/api/administration_api.rb +425 -106
- data/lib/budgea_client/api/authentication_api.rb +287 -46
- data/lib/budgea_client/api/banks_api.rb +1271 -974
- data/lib/budgea_client/api/connections_api.rb +207 -156
- data/lib/budgea_client/api/documents_api.rb +627 -693
- data/lib/budgea_client/api/ocr_api.rb +24 -16
- data/lib/budgea_client/api/oidc_api.rb +23 -16
- data/lib/budgea_client/api/pfm_api.rb +219 -248
- data/lib/budgea_client/api/providers_api.rb +998 -1099
- data/lib/budgea_client/api/recipients_api.rb +52 -34
- data/lib/budgea_client/api/terms_api.rb +34 -31
- data/lib/budgea_client/api/transfers_api.rb +245 -239
- data/lib/budgea_client/api/users_management_api.rb +56 -58
- data/lib/budgea_client/api/wealth_api.rb +81 -85
- data/lib/budgea_client/api_client.rb +20 -11
- data/lib/budgea_client/api_error.rb +11 -1
- data/lib/budgea_client/configuration.rb +12 -2
- data/lib/budgea_client/models/access.rb +18 -13
- data/lib/budgea_client/models/account.rb +44 -23
- data/lib/budgea_client/models/account_log.rb +33 -28
- data/lib/budgea_client/models/account_type.rb +22 -17
- data/lib/budgea_client/models/alert.rb +21 -16
- data/lib/budgea_client/models/bank.rb +21 -16
- data/lib/budgea_client/models/bank_category.rb +19 -14
- data/lib/budgea_client/models/category.rb +22 -17
- data/lib/budgea_client/models/certificate.rb +244 -0
- data/lib/budgea_client/models/client.rb +53 -20
- data/lib/budgea_client/models/connection.rb +29 -24
- data/lib/budgea_client/models/connection_log.rb +39 -24
- data/lib/budgea_client/models/connector.rb +345 -0
- data/lib/budgea_client/models/connector_category.rb +206 -0
- data/lib/budgea_client/models/connector_logo.rb +29 -24
- data/lib/budgea_client/models/currency.rb +63 -16
- data/lib/budgea_client/models/device.rb +23 -18
- data/lib/budgea_client/models/document.rb +21 -16
- data/lib/budgea_client/models/document_type.rb +19 -14
- data/lib/budgea_client/models/field.rb +44 -27
- data/lib/budgea_client/models/field_value.rb +18 -13
- data/lib/budgea_client/models/file.rb +20 -15
- data/lib/budgea_client/models/group.rb +17 -12
- data/lib/budgea_client/models/hash_table.rb +20 -15
- data/lib/budgea_client/models/inline_response_200.rb +17 -12
- data/lib/budgea_client/models/inline_response_200_1.rb +18 -13
- data/lib/budgea_client/models/inline_response_200_10.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_11.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_12.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_13.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_14.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_15.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_16.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_17.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_18.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_19.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_2.rb +18 -13
- data/lib/budgea_client/models/inline_response_200_20.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_21.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_22.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_23.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_24.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_25.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_26.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_27.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_28.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_29.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_3.rb +37 -47
- data/lib/budgea_client/models/inline_response_200_30.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_31.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_32.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_33.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_34.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_35.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_36.rb +190 -0
- data/lib/budgea_client/models/inline_response_200_4.rb +20 -40
- data/lib/budgea_client/models/inline_response_200_5.rb +75 -30
- data/lib/budgea_client/models/inline_response_200_6.rb +37 -47
- data/lib/budgea_client/models/inline_response_200_7.rb +55 -21
- data/lib/budgea_client/models/inline_response_200_8.rb +27 -22
- data/lib/budgea_client/models/inline_response_200_9.rb +27 -22
- data/lib/budgea_client/models/investment.rb +20 -15
- data/lib/budgea_client/models/investment_value.rb +20 -15
- data/lib/budgea_client/models/invite.rb +18 -13
- data/lib/budgea_client/models/locked_user.rb +18 -13
- data/lib/budgea_client/models/oidc_whitelist.rb +18 -13
- data/lib/budgea_client/models/pocket.rb +22 -17
- data/lib/budgea_client/models/profile.rb +26 -20
- data/lib/budgea_client/models/project.rb +26 -21
- data/lib/budgea_client/models/project_type.rb +18 -13
- data/lib/budgea_client/models/recipient.rb +52 -17
- data/lib/budgea_client/models/recipient_log.rb +254 -0
- data/lib/budgea_client/models/security.rb +18 -13
- data/lib/budgea_client/models/subscription.rb +31 -21
- data/lib/budgea_client/models/terms_of_service.rb +19 -14
- data/lib/budgea_client/models/transaction.rb +83 -33
- data/lib/budgea_client/models/transaction_information.rb +19 -14
- data/lib/budgea_client/models/transactions_cluster.rb +21 -16
- data/lib/budgea_client/models/transfer.rb +32 -16
- data/lib/budgea_client/models/transfer_log.rb +254 -0
- data/lib/budgea_client/models/user.rb +22 -16
- data/lib/budgea_client/models/user_alert.rb +22 -16
- data/lib/budgea_client/models/webhook.rb +19 -14
- data/lib/budgea_client/models/webhook_log.rb +264 -0
- data/lib/budgea_client/version.rb +12 -2
- data/original_budgea_openapi.json +23188 -0
- data/spec/models/certificate_spec.rb +65 -0
- data/spec/models/connector_category_spec.rb +47 -0
- data/spec/models/connector_spec.rb +119 -0
- data/spec/models/inline_response_200_34_spec.rb +41 -0
- data/spec/models/inline_response_200_35_spec.rb +41 -0
- data/spec/models/inline_response_200_36_spec.rb +41 -0
- data/spec/models/recipient_log_spec.rb +77 -0
- data/spec/models/transfer_log_spec.rb +77 -0
- data/spec/models/webhook_log_spec.rb +83 -0
- metadata +52 -18
- data/pkg/budgea_client-1.3.9.gem +0 -0
- data/pkg/budgea_client-1.4.2.gem +0 -0
- data/pkg/budgea_client-1.4.3.gem +0 -0
@@ -1,9 +1,18 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
|
+
#Budgea API Documentation
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.1
|
10
|
+
|
11
|
+
=end
|
2
12
|
|
3
13
|
require 'date'
|
4
14
|
|
5
15
|
module BudgeaClient
|
6
|
-
|
7
16
|
class User
|
8
17
|
attr_accessor :id
|
9
18
|
|
@@ -57,7 +66,7 @@ module BudgeaClient
|
|
57
66
|
return unless attributes.is_a?(Hash)
|
58
67
|
|
59
68
|
# convert string to symbol for hash key
|
60
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
61
70
|
|
62
71
|
if attributes.has_key?(:'id')
|
63
72
|
self.id = attributes[:'id']
|
@@ -70,7 +79,6 @@ module BudgeaClient
|
|
70
79
|
if attributes.has_key?(:'platform')
|
71
80
|
self.platform = attributes[:'platform']
|
72
81
|
end
|
73
|
-
|
74
82
|
end
|
75
83
|
|
76
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -78,18 +86,18 @@ module BudgeaClient
|
|
78
86
|
def list_invalid_properties
|
79
87
|
invalid_properties = Array.new
|
80
88
|
if @id.nil?
|
81
|
-
invalid_properties.push(
|
89
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
82
90
|
end
|
83
91
|
|
84
92
|
if @signin.nil?
|
85
|
-
invalid_properties.push(
|
93
|
+
invalid_properties.push('invalid value for "signin", signin cannot be nil.')
|
86
94
|
end
|
87
95
|
|
88
96
|
if @platform.nil?
|
89
|
-
invalid_properties.push(
|
97
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
90
98
|
end
|
91
99
|
|
92
|
-
|
100
|
+
invalid_properties
|
93
101
|
end
|
94
102
|
|
95
103
|
# Check to see if the all the properties in the model are valid
|
@@ -98,17 +106,17 @@ module BudgeaClient
|
|
98
106
|
return false if @id.nil?
|
99
107
|
return false if @signin.nil?
|
100
108
|
return false if @platform.nil?
|
101
|
-
platform_validator = EnumAttributeValidator.new('String', [
|
109
|
+
platform_validator = EnumAttributeValidator.new('String', ['web', 'iPad', 'iPhone', 'Android', 'CAstore', 'requestAccess', 'sharedAccess', 'transfer'])
|
102
110
|
return false unless platform_validator.valid?(@platform)
|
103
|
-
|
111
|
+
true
|
104
112
|
end
|
105
113
|
|
106
114
|
# Custom attribute writer method checking allowed values (enum).
|
107
115
|
# @param [Object] platform Object to be assigned
|
108
116
|
def platform=(platform)
|
109
|
-
validator = EnumAttributeValidator.new('String', [
|
117
|
+
validator = EnumAttributeValidator.new('String', ['web', 'iPad', 'iPhone', 'Android', 'CAstore', 'requestAccess', 'sharedAccess', 'transfer'])
|
110
118
|
unless validator.valid?(platform)
|
111
|
-
fail ArgumentError,
|
119
|
+
fail ArgumentError, 'invalid value for "platform", must be one of #{validator.allowable_values}.'
|
112
120
|
end
|
113
121
|
@platform = platform
|
114
122
|
end
|
@@ -145,7 +153,7 @@ module BudgeaClient
|
|
145
153
|
# check to ensure the input is an array given that the the attribute
|
146
154
|
# is documented as an array but the input is not
|
147
155
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
148
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
156
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
149
157
|
end
|
150
158
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
151
159
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -227,7 +235,7 @@ module BudgeaClient
|
|
227
235
|
# @return [Hash] Returns the value in the form of hash
|
228
236
|
def _to_hash(value)
|
229
237
|
if value.is_a?(Array)
|
230
|
-
value.compact.map{ |v| _to_hash(v) }
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
231
239
|
elsif value.is_a?(Hash)
|
232
240
|
{}.tap do |hash|
|
233
241
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -238,7 +246,5 @@ module BudgeaClient
|
|
238
246
|
value
|
239
247
|
end
|
240
248
|
end
|
241
|
-
|
242
249
|
end
|
243
|
-
|
244
250
|
end
|
@@ -1,4 +1,14 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
|
+
#Budgea API Documentation
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.1
|
10
|
+
|
11
|
+
=end
|
2
12
|
|
3
13
|
require 'date'
|
4
14
|
|
@@ -33,7 +43,6 @@ module BudgeaClient
|
|
33
43
|
|
34
44
|
attr_accessor :resume_frequency
|
35
45
|
|
36
|
-
|
37
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
47
|
def self.attribute_map
|
39
48
|
{
|
@@ -80,7 +89,7 @@ module BudgeaClient
|
|
80
89
|
return unless attributes.is_a?(Hash)
|
81
90
|
|
82
91
|
# convert string to symbol for hash key
|
83
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
84
93
|
|
85
94
|
if attributes.has_key?(:'id')
|
86
95
|
self.id = attributes[:'id']
|
@@ -131,13 +140,13 @@ module BudgeaClient
|
|
131
140
|
if attributes.has_key?(:'value_type')
|
132
141
|
self.value_type = attributes[:'value_type']
|
133
142
|
else
|
134
|
-
self.value_type =
|
143
|
+
self.value_type = 'flat'
|
135
144
|
end
|
136
145
|
|
137
146
|
if attributes.has_key?(:'type')
|
138
147
|
self.type = attributes[:'type']
|
139
148
|
else
|
140
|
-
self.type =
|
149
|
+
self.type = 'transactions'
|
141
150
|
end
|
142
151
|
|
143
152
|
if attributes.has_key?(:'transaction_types')
|
@@ -155,7 +164,6 @@ module BudgeaClient
|
|
155
164
|
if attributes.has_key?(:'resume_frequency')
|
156
165
|
self.resume_frequency = attributes[:'resume_frequency']
|
157
166
|
end
|
158
|
-
|
159
167
|
end
|
160
168
|
|
161
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -163,22 +171,22 @@ module BudgeaClient
|
|
163
171
|
def list_invalid_properties
|
164
172
|
invalid_properties = Array.new
|
165
173
|
if @id.nil?
|
166
|
-
invalid_properties.push(
|
174
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
167
175
|
end
|
168
176
|
|
169
177
|
if @value_type.nil?
|
170
|
-
invalid_properties.push(
|
178
|
+
invalid_properties.push('invalid value for "value_type", value_type cannot be nil.')
|
171
179
|
end
|
172
180
|
|
173
181
|
if @type.nil?
|
174
|
-
invalid_properties.push(
|
182
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
175
183
|
end
|
176
184
|
|
177
185
|
if @resume_frequency.nil?
|
178
|
-
invalid_properties.push(
|
186
|
+
invalid_properties.push('invalid value for "resume_frequency", resume_frequency cannot be nil.')
|
179
187
|
end
|
180
188
|
|
181
|
-
|
189
|
+
invalid_properties
|
182
190
|
end
|
183
191
|
|
184
192
|
# Check to see if the all the properties in the model are valid
|
@@ -188,7 +196,7 @@ module BudgeaClient
|
|
188
196
|
return false if @value_type.nil?
|
189
197
|
return false if @type.nil?
|
190
198
|
return false if @resume_frequency.nil?
|
191
|
-
|
199
|
+
true
|
192
200
|
end
|
193
201
|
|
194
202
|
# Checks equality by comparing each attribute.
|
@@ -234,7 +242,7 @@ module BudgeaClient
|
|
234
242
|
# check to ensure the input is an array given that the the attribute
|
235
243
|
# is documented as an array but the input is not
|
236
244
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
237
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
245
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
238
246
|
end
|
239
247
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
240
248
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -316,7 +324,7 @@ module BudgeaClient
|
|
316
324
|
# @return [Hash] Returns the value in the form of hash
|
317
325
|
def _to_hash(value)
|
318
326
|
if value.is_a?(Array)
|
319
|
-
value.compact.map{ |v| _to_hash(v) }
|
327
|
+
value.compact.map { |v| _to_hash(v) }
|
320
328
|
elsif value.is_a?(Hash)
|
321
329
|
{}.tap do |hash|
|
322
330
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -327,7 +335,5 @@ module BudgeaClient
|
|
327
335
|
value
|
328
336
|
end
|
329
337
|
end
|
330
|
-
|
331
338
|
end
|
332
|
-
|
333
339
|
end
|
@@ -1,9 +1,18 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
|
+
#Budgea API Documentation
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.1
|
10
|
+
|
11
|
+
=end
|
2
12
|
|
3
13
|
require 'date'
|
4
14
|
|
5
15
|
module BudgeaClient
|
6
|
-
|
7
16
|
class Webhook
|
8
17
|
# ID of the webhook
|
9
18
|
attr_accessor :id
|
@@ -29,7 +38,6 @@ module BudgeaClient
|
|
29
38
|
# URL of the webhook
|
30
39
|
attr_accessor :url
|
31
40
|
|
32
|
-
|
33
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
42
|
def self.attribute_map
|
35
43
|
{
|
@@ -64,7 +72,7 @@ module BudgeaClient
|
|
64
72
|
return unless attributes.is_a?(Hash)
|
65
73
|
|
66
74
|
# convert string to symbol for hash key
|
67
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
76
|
|
69
77
|
if attributes.has_key?(:'id')
|
70
78
|
self.id = attributes[:'id']
|
@@ -97,7 +105,6 @@ module BudgeaClient
|
|
97
105
|
if attributes.has_key?(:'url')
|
98
106
|
self.url = attributes[:'url']
|
99
107
|
end
|
100
|
-
|
101
108
|
end
|
102
109
|
|
103
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -105,18 +112,18 @@ module BudgeaClient
|
|
105
112
|
def list_invalid_properties
|
106
113
|
invalid_properties = Array.new
|
107
114
|
if @id.nil?
|
108
|
-
invalid_properties.push(
|
115
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
109
116
|
end
|
110
117
|
|
111
118
|
if @created.nil?
|
112
|
-
invalid_properties.push(
|
119
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
113
120
|
end
|
114
121
|
|
115
122
|
if @updated.nil?
|
116
|
-
invalid_properties.push(
|
123
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
117
124
|
end
|
118
125
|
|
119
|
-
|
126
|
+
invalid_properties
|
120
127
|
end
|
121
128
|
|
122
129
|
# Check to see if the all the properties in the model are valid
|
@@ -125,7 +132,7 @@ module BudgeaClient
|
|
125
132
|
return false if @id.nil?
|
126
133
|
return false if @created.nil?
|
127
134
|
return false if @updated.nil?
|
128
|
-
|
135
|
+
true
|
129
136
|
end
|
130
137
|
|
131
138
|
# Checks equality by comparing each attribute.
|
@@ -165,7 +172,7 @@ module BudgeaClient
|
|
165
172
|
# check to ensure the input is an array given that the the attribute
|
166
173
|
# is documented as an array but the input is not
|
167
174
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
175
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
169
176
|
end
|
170
177
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
171
178
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -247,7 +254,7 @@ module BudgeaClient
|
|
247
254
|
# @return [Hash] Returns the value in the form of hash
|
248
255
|
def _to_hash(value)
|
249
256
|
if value.is_a?(Array)
|
250
|
-
value.compact.map{ |v| _to_hash(v) }
|
257
|
+
value.compact.map { |v| _to_hash(v) }
|
251
258
|
elsif value.is_a?(Hash)
|
252
259
|
{}.tap do |hash|
|
253
260
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -258,7 +265,5 @@ module BudgeaClient
|
|
258
265
|
value
|
259
266
|
end
|
260
267
|
end
|
261
|
-
|
262
268
|
end
|
263
|
-
|
264
269
|
end
|
@@ -0,0 +1,264 @@
|
|
1
|
+
=begin
|
2
|
+
#Budgea API Documentation
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module BudgeaClient
|
16
|
+
class WebhookLog
|
17
|
+
# ID of the log
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# ID of the webhook data
|
21
|
+
attr_accessor :id_webhook_data
|
22
|
+
|
23
|
+
# ID of the service
|
24
|
+
attr_accessor :id_service
|
25
|
+
|
26
|
+
# ID of the user
|
27
|
+
attr_accessor :id_user
|
28
|
+
|
29
|
+
# Timestamp when the hook was sent
|
30
|
+
attr_accessor :timestamp
|
31
|
+
|
32
|
+
# Timestamp of the reply to the hook
|
33
|
+
attr_accessor :response_date
|
34
|
+
|
35
|
+
# Return code of the reply to the hook
|
36
|
+
attr_accessor :response_code
|
37
|
+
|
38
|
+
# If the log is an error, do not retry to push before this timestamp
|
39
|
+
attr_accessor :next_try
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'id' => :'id',
|
45
|
+
:'id_webhook_data' => :'id_webhook_data',
|
46
|
+
:'id_service' => :'id_service',
|
47
|
+
:'id_user' => :'id_user',
|
48
|
+
:'timestamp' => :'timestamp',
|
49
|
+
:'response_date' => :'response_date',
|
50
|
+
:'response_code' => :'response_code',
|
51
|
+
:'next_try' => :'next_try'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.swagger_types
|
57
|
+
{
|
58
|
+
:'id' => :'Integer',
|
59
|
+
:'id_webhook_data' => :'Integer',
|
60
|
+
:'id_service' => :'Integer',
|
61
|
+
:'id_user' => :'Integer',
|
62
|
+
:'timestamp' => :'DateTime',
|
63
|
+
:'response_date' => :'DateTime',
|
64
|
+
:'response_code' => :'Integer',
|
65
|
+
:'next_try' => :'DateTime'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Initializes the object
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
+
def initialize(attributes = {})
|
72
|
+
return unless attributes.is_a?(Hash)
|
73
|
+
|
74
|
+
# convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
76
|
+
|
77
|
+
if attributes.has_key?(:'id')
|
78
|
+
self.id = attributes[:'id']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'id_webhook_data')
|
82
|
+
self.id_webhook_data = attributes[:'id_webhook_data']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'id_service')
|
86
|
+
self.id_service = attributes[:'id_service']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'id_user')
|
90
|
+
self.id_user = attributes[:'id_user']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'timestamp')
|
94
|
+
self.timestamp = attributes[:'timestamp']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'response_date')
|
98
|
+
self.response_date = attributes[:'response_date']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'response_code')
|
102
|
+
self.response_code = attributes[:'response_code']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'next_try')
|
106
|
+
self.next_try = attributes[:'next_try']
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
111
|
+
# @return Array for valid properties with the reasons
|
112
|
+
def list_invalid_properties
|
113
|
+
invalid_properties = Array.new
|
114
|
+
if @id.nil?
|
115
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if @timestamp.nil?
|
119
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
120
|
+
end
|
121
|
+
|
122
|
+
invalid_properties
|
123
|
+
end
|
124
|
+
|
125
|
+
# Check to see if the all the properties in the model are valid
|
126
|
+
# @return true if the model is valid
|
127
|
+
def valid?
|
128
|
+
return false if @id.nil?
|
129
|
+
return false if @timestamp.nil?
|
130
|
+
true
|
131
|
+
end
|
132
|
+
|
133
|
+
# Checks equality by comparing each attribute.
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def ==(o)
|
136
|
+
return true if self.equal?(o)
|
137
|
+
self.class == o.class &&
|
138
|
+
id == o.id &&
|
139
|
+
id_webhook_data == o.id_webhook_data &&
|
140
|
+
id_service == o.id_service &&
|
141
|
+
id_user == o.id_user &&
|
142
|
+
timestamp == o.timestamp &&
|
143
|
+
response_date == o.response_date &&
|
144
|
+
response_code == o.response_code &&
|
145
|
+
next_try == o.next_try
|
146
|
+
end
|
147
|
+
|
148
|
+
# @see the `==` method
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def eql?(o)
|
151
|
+
self == o
|
152
|
+
end
|
153
|
+
|
154
|
+
# Calculates hash code according to all attributes.
|
155
|
+
# @return [Fixnum] Hash code
|
156
|
+
def hash
|
157
|
+
[id, id_webhook_data, id_service, id_user, timestamp, response_date, response_code, next_try].hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Builds the object from hash
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
162
|
+
# @return [Object] Returns the model itself
|
163
|
+
def build_from_hash(attributes)
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
165
|
+
self.class.swagger_types.each_pair do |key, type|
|
166
|
+
if type =~ /\AArray<(.*)>/i
|
167
|
+
# check to ensure the input is an array given that the the attribute
|
168
|
+
# is documented as an array but the input is not
|
169
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
171
|
+
end
|
172
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
173
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
174
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
175
|
+
end
|
176
|
+
|
177
|
+
self
|
178
|
+
end
|
179
|
+
|
180
|
+
# Deserializes the data based on type
|
181
|
+
# @param string type Data type
|
182
|
+
# @param string value Value to be deserialized
|
183
|
+
# @return [Object] Deserialized data
|
184
|
+
def _deserialize(type, value)
|
185
|
+
case type.to_sym
|
186
|
+
when :DateTime
|
187
|
+
DateTime.parse(value)
|
188
|
+
when :Date
|
189
|
+
Date.parse(value)
|
190
|
+
when :String
|
191
|
+
value.to_s
|
192
|
+
when :Integer
|
193
|
+
value.to_i
|
194
|
+
when :Float
|
195
|
+
value.to_f
|
196
|
+
when :BOOLEAN
|
197
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
198
|
+
true
|
199
|
+
else
|
200
|
+
false
|
201
|
+
end
|
202
|
+
when :Object
|
203
|
+
# generic object (usually a Hash), return directly
|
204
|
+
value
|
205
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
206
|
+
inner_type = Regexp.last_match[:inner_type]
|
207
|
+
value.map { |v| _deserialize(inner_type, v) }
|
208
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
209
|
+
k_type = Regexp.last_match[:k_type]
|
210
|
+
v_type = Regexp.last_match[:v_type]
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each do |k, v|
|
213
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
else # model
|
217
|
+
temp_model = BudgeaClient.const_get(type).new
|
218
|
+
temp_model.build_from_hash(value)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# Returns the string representation of the object
|
223
|
+
# @return [String] String presentation of the object
|
224
|
+
def to_s
|
225
|
+
to_hash.to_s
|
226
|
+
end
|
227
|
+
|
228
|
+
# to_body is an alias to to_hash (backward compatibility)
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_body
|
231
|
+
to_hash
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the object in the form of hash
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
236
|
+
def to_hash
|
237
|
+
hash = {}
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
239
|
+
value = self.send(attr)
|
240
|
+
next if value.nil?
|
241
|
+
hash[param] = _to_hash(value)
|
242
|
+
end
|
243
|
+
hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Outputs non-array value in the form of hash
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
248
|
+
# @param [Object] value Any valid value
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
250
|
+
def _to_hash(value)
|
251
|
+
if value.is_a?(Array)
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
253
|
+
elsif value.is_a?(Hash)
|
254
|
+
{}.tap do |hash|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
256
|
+
end
|
257
|
+
elsif value.respond_to? :to_hash
|
258
|
+
value.to_hash
|
259
|
+
else
|
260
|
+
value
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|