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.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +67 -725
  4. data/budgea_client.gemspec +15 -3
  5. data/budgea_openapi.json +2011 -524
  6. data/docs/Account.md +3 -1
  7. data/docs/AccountLog.md +2 -2
  8. data/docs/AdministrationApi.md +354 -34
  9. data/docs/AuthenticationApi.md +264 -18
  10. data/docs/BankCategory.md +1 -1
  11. data/docs/BanksApi.md +939 -550
  12. data/docs/Certificate.md +12 -0
  13. data/docs/Client.md +5 -2
  14. data/docs/Connection.md +1 -1
  15. data/docs/ConnectionLog.md +3 -2
  16. data/docs/ConnectionsApi.md +162 -103
  17. data/docs/Connector.md +21 -0
  18. data/docs/ConnectorCategory.md +9 -0
  19. data/docs/ConnectorLogo.md +1 -1
  20. data/docs/Currency.md +4 -0
  21. data/docs/DocumentsApi.md +350 -350
  22. data/docs/Field.md +3 -2
  23. data/docs/InlineResponse20010.md +1 -1
  24. data/docs/InlineResponse20011.md +1 -1
  25. data/docs/InlineResponse20012.md +1 -1
  26. data/docs/InlineResponse20013.md +1 -1
  27. data/docs/InlineResponse20014.md +1 -1
  28. data/docs/InlineResponse20015.md +1 -1
  29. data/docs/InlineResponse20016.md +1 -1
  30. data/docs/InlineResponse20017.md +1 -1
  31. data/docs/InlineResponse20018.md +1 -1
  32. data/docs/InlineResponse20019.md +1 -1
  33. data/docs/InlineResponse20020.md +1 -1
  34. data/docs/InlineResponse20021.md +1 -1
  35. data/docs/InlineResponse20022.md +1 -1
  36. data/docs/InlineResponse20023.md +1 -1
  37. data/docs/InlineResponse20024.md +1 -1
  38. data/docs/InlineResponse20025.md +1 -1
  39. data/docs/InlineResponse20026.md +1 -1
  40. data/docs/InlineResponse20027.md +1 -1
  41. data/docs/InlineResponse20028.md +1 -1
  42. data/docs/InlineResponse20029.md +1 -1
  43. data/docs/InlineResponse2003.md +2 -3
  44. data/docs/InlineResponse20030.md +1 -1
  45. data/docs/InlineResponse20031.md +1 -1
  46. data/docs/InlineResponse20032.md +1 -1
  47. data/docs/InlineResponse20033.md +1 -1
  48. data/docs/InlineResponse20034.md +8 -0
  49. data/docs/InlineResponse20035.md +8 -0
  50. data/docs/InlineResponse20036.md +8 -0
  51. data/docs/InlineResponse2004.md +0 -2
  52. data/docs/InlineResponse2005.md +5 -2
  53. data/docs/InlineResponse2006.md +2 -3
  54. data/docs/InlineResponse2007.md +3 -1
  55. data/docs/InlineResponse2008.md +1 -1
  56. data/docs/InlineResponse2009.md +1 -1
  57. data/docs/OCRApi.md +5 -5
  58. data/docs/OIDCApi.md +5 -5
  59. data/docs/PFMApi.md +122 -122
  60. data/docs/Pocket.md +1 -1
  61. data/docs/Profile.md +1 -1
  62. data/docs/Project.md +1 -1
  63. data/docs/ProvidersApi.md +602 -604
  64. data/docs/Recipient.md +3 -0
  65. data/docs/RecipientLog.md +14 -0
  66. data/docs/RecipientsApi.md +28 -20
  67. data/docs/Subscription.md +2 -1
  68. data/docs/TermsApi.md +13 -15
  69. data/docs/Transaction.md +8 -3
  70. data/docs/Transfer.md +1 -0
  71. data/docs/TransferLog.md +14 -0
  72. data/docs/TransfersApi.md +165 -141
  73. data/docs/UserAlert.md +2 -2
  74. data/docs/UsersManagementApi.md +24 -24
  75. data/docs/WealthApi.md +54 -54
  76. data/docs/WebhookLog.md +15 -0
  77. data/lib/budgea_client.rb +27 -3
  78. data/lib/budgea_client/api/administration_api.rb +425 -106
  79. data/lib/budgea_client/api/authentication_api.rb +287 -46
  80. data/lib/budgea_client/api/banks_api.rb +1271 -974
  81. data/lib/budgea_client/api/connections_api.rb +207 -156
  82. data/lib/budgea_client/api/documents_api.rb +627 -693
  83. data/lib/budgea_client/api/ocr_api.rb +24 -16
  84. data/lib/budgea_client/api/oidc_api.rb +23 -16
  85. data/lib/budgea_client/api/pfm_api.rb +219 -248
  86. data/lib/budgea_client/api/providers_api.rb +998 -1099
  87. data/lib/budgea_client/api/recipients_api.rb +52 -34
  88. data/lib/budgea_client/api/terms_api.rb +34 -31
  89. data/lib/budgea_client/api/transfers_api.rb +245 -239
  90. data/lib/budgea_client/api/users_management_api.rb +56 -58
  91. data/lib/budgea_client/api/wealth_api.rb +81 -85
  92. data/lib/budgea_client/api_client.rb +20 -11
  93. data/lib/budgea_client/api_error.rb +11 -1
  94. data/lib/budgea_client/configuration.rb +12 -2
  95. data/lib/budgea_client/models/access.rb +18 -13
  96. data/lib/budgea_client/models/account.rb +44 -23
  97. data/lib/budgea_client/models/account_log.rb +33 -28
  98. data/lib/budgea_client/models/account_type.rb +22 -17
  99. data/lib/budgea_client/models/alert.rb +21 -16
  100. data/lib/budgea_client/models/bank.rb +21 -16
  101. data/lib/budgea_client/models/bank_category.rb +19 -14
  102. data/lib/budgea_client/models/category.rb +22 -17
  103. data/lib/budgea_client/models/certificate.rb +244 -0
  104. data/lib/budgea_client/models/client.rb +53 -20
  105. data/lib/budgea_client/models/connection.rb +29 -24
  106. data/lib/budgea_client/models/connection_log.rb +39 -24
  107. data/lib/budgea_client/models/connector.rb +345 -0
  108. data/lib/budgea_client/models/connector_category.rb +206 -0
  109. data/lib/budgea_client/models/connector_logo.rb +29 -24
  110. data/lib/budgea_client/models/currency.rb +63 -16
  111. data/lib/budgea_client/models/device.rb +23 -18
  112. data/lib/budgea_client/models/document.rb +21 -16
  113. data/lib/budgea_client/models/document_type.rb +19 -14
  114. data/lib/budgea_client/models/field.rb +44 -27
  115. data/lib/budgea_client/models/field_value.rb +18 -13
  116. data/lib/budgea_client/models/file.rb +20 -15
  117. data/lib/budgea_client/models/group.rb +17 -12
  118. data/lib/budgea_client/models/hash_table.rb +20 -15
  119. data/lib/budgea_client/models/inline_response_200.rb +17 -12
  120. data/lib/budgea_client/models/inline_response_200_1.rb +18 -13
  121. data/lib/budgea_client/models/inline_response_200_10.rb +27 -22
  122. data/lib/budgea_client/models/inline_response_200_11.rb +27 -22
  123. data/lib/budgea_client/models/inline_response_200_12.rb +27 -22
  124. data/lib/budgea_client/models/inline_response_200_13.rb +27 -22
  125. data/lib/budgea_client/models/inline_response_200_14.rb +27 -22
  126. data/lib/budgea_client/models/inline_response_200_15.rb +27 -22
  127. data/lib/budgea_client/models/inline_response_200_16.rb +27 -22
  128. data/lib/budgea_client/models/inline_response_200_17.rb +27 -22
  129. data/lib/budgea_client/models/inline_response_200_18.rb +27 -22
  130. data/lib/budgea_client/models/inline_response_200_19.rb +27 -22
  131. data/lib/budgea_client/models/inline_response_200_2.rb +18 -13
  132. data/lib/budgea_client/models/inline_response_200_20.rb +27 -22
  133. data/lib/budgea_client/models/inline_response_200_21.rb +27 -22
  134. data/lib/budgea_client/models/inline_response_200_22.rb +27 -22
  135. data/lib/budgea_client/models/inline_response_200_23.rb +27 -22
  136. data/lib/budgea_client/models/inline_response_200_24.rb +27 -22
  137. data/lib/budgea_client/models/inline_response_200_25.rb +27 -22
  138. data/lib/budgea_client/models/inline_response_200_26.rb +27 -22
  139. data/lib/budgea_client/models/inline_response_200_27.rb +27 -22
  140. data/lib/budgea_client/models/inline_response_200_28.rb +27 -22
  141. data/lib/budgea_client/models/inline_response_200_29.rb +27 -22
  142. data/lib/budgea_client/models/inline_response_200_3.rb +37 -47
  143. data/lib/budgea_client/models/inline_response_200_30.rb +27 -22
  144. data/lib/budgea_client/models/inline_response_200_31.rb +27 -22
  145. data/lib/budgea_client/models/inline_response_200_32.rb +27 -22
  146. data/lib/budgea_client/models/inline_response_200_33.rb +27 -22
  147. data/lib/budgea_client/models/inline_response_200_34.rb +190 -0
  148. data/lib/budgea_client/models/inline_response_200_35.rb +190 -0
  149. data/lib/budgea_client/models/inline_response_200_36.rb +190 -0
  150. data/lib/budgea_client/models/inline_response_200_4.rb +20 -40
  151. data/lib/budgea_client/models/inline_response_200_5.rb +75 -30
  152. data/lib/budgea_client/models/inline_response_200_6.rb +37 -47
  153. data/lib/budgea_client/models/inline_response_200_7.rb +55 -21
  154. data/lib/budgea_client/models/inline_response_200_8.rb +27 -22
  155. data/lib/budgea_client/models/inline_response_200_9.rb +27 -22
  156. data/lib/budgea_client/models/investment.rb +20 -15
  157. data/lib/budgea_client/models/investment_value.rb +20 -15
  158. data/lib/budgea_client/models/invite.rb +18 -13
  159. data/lib/budgea_client/models/locked_user.rb +18 -13
  160. data/lib/budgea_client/models/oidc_whitelist.rb +18 -13
  161. data/lib/budgea_client/models/pocket.rb +22 -17
  162. data/lib/budgea_client/models/profile.rb +26 -20
  163. data/lib/budgea_client/models/project.rb +26 -21
  164. data/lib/budgea_client/models/project_type.rb +18 -13
  165. data/lib/budgea_client/models/recipient.rb +52 -17
  166. data/lib/budgea_client/models/recipient_log.rb +254 -0
  167. data/lib/budgea_client/models/security.rb +18 -13
  168. data/lib/budgea_client/models/subscription.rb +31 -21
  169. data/lib/budgea_client/models/terms_of_service.rb +19 -14
  170. data/lib/budgea_client/models/transaction.rb +83 -33
  171. data/lib/budgea_client/models/transaction_information.rb +19 -14
  172. data/lib/budgea_client/models/transactions_cluster.rb +21 -16
  173. data/lib/budgea_client/models/transfer.rb +32 -16
  174. data/lib/budgea_client/models/transfer_log.rb +254 -0
  175. data/lib/budgea_client/models/user.rb +22 -16
  176. data/lib/budgea_client/models/user_alert.rb +22 -16
  177. data/lib/budgea_client/models/webhook.rb +19 -14
  178. data/lib/budgea_client/models/webhook_log.rb +264 -0
  179. data/lib/budgea_client/version.rb +12 -2
  180. data/original_budgea_openapi.json +23188 -0
  181. data/spec/models/certificate_spec.rb +65 -0
  182. data/spec/models/connector_category_spec.rb +47 -0
  183. data/spec/models/connector_spec.rb +119 -0
  184. data/spec/models/inline_response_200_34_spec.rb +41 -0
  185. data/spec/models/inline_response_200_35_spec.rb +41 -0
  186. data/spec/models/inline_response_200_36_spec.rb +41 -0
  187. data/spec/models/recipient_log_spec.rb +77 -0
  188. data/spec/models/transfer_log_spec.rb +77 -0
  189. data/spec/models/webhook_log_spec.rb +83 -0
  190. metadata +52 -18
  191. data/pkg/budgea_client-1.3.9.gem +0 -0
  192. data/pkg/budgea_client-1.4.2.gem +0 -0
  193. data/pkg/budgea_client-1.4.3.gem +0 -0
@@ -1,9 +1,18 @@
1
- # frozen_string_literal: true
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 Connection
8
17
  # ID of connection
9
18
  attr_accessor :id
@@ -11,8 +20,8 @@ module BudgeaClient
11
20
  # ID of the related user
12
21
  attr_accessor :id_user
13
22
 
14
- # ID of the related bank or provider
15
- attr_accessor :id_bank
23
+ # ID of the related connector
24
+ attr_accessor :id_connector
16
25
 
17
26
  # Last successful update
18
27
  attr_accessor :last_update
@@ -34,13 +43,12 @@ module BudgeaClient
34
43
 
35
44
  attr_accessor :accounts
36
45
 
37
-
38
46
  # Attribute mapping from ruby-style variable name to JSON key.
39
47
  def self.attribute_map
40
48
  {
41
49
  :'id' => :'id',
42
50
  :'id_user' => :'id_user',
43
- :'id_bank' => :'id_bank',
51
+ :'id_connector' => :'id_connector',
44
52
  :'last_update' => :'last_update',
45
53
  :'error' => :'error',
46
54
  :'expire' => :'expire',
@@ -56,7 +64,7 @@ module BudgeaClient
56
64
  {
57
65
  :'id' => :'Integer',
58
66
  :'id_user' => :'Integer',
59
- :'id_bank' => :'Integer',
67
+ :'id_connector' => :'Integer',
60
68
  :'last_update' => :'DateTime',
61
69
  :'error' => :'String',
62
70
  :'expire' => :'DateTime',
@@ -73,7 +81,7 @@ module BudgeaClient
73
81
  return unless attributes.is_a?(Hash)
74
82
 
75
83
  # convert string to symbol for hash key
76
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
84
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
77
85
 
78
86
  if attributes.has_key?(:'id')
79
87
  self.id = attributes[:'id']
@@ -83,8 +91,8 @@ module BudgeaClient
83
91
  self.id_user = attributes[:'id_user']
84
92
  end
85
93
 
86
- if attributes.has_key?(:'id_bank')
87
- self.id_bank = attributes[:'id_bank']
94
+ if attributes.has_key?(:'id_connector')
95
+ self.id_connector = attributes[:'id_connector']
88
96
  end
89
97
 
90
98
  if attributes.has_key?(:'last_update')
@@ -118,7 +126,6 @@ module BudgeaClient
118
126
  self.accounts = value
119
127
  end
120
128
  end
121
-
122
129
  end
123
130
 
124
131
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -126,27 +133,27 @@ module BudgeaClient
126
133
  def list_invalid_properties
127
134
  invalid_properties = Array.new
128
135
  if @id.nil?
129
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
136
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
137
  end
131
138
 
132
- if @id_bank.nil?
133
- invalid_properties.push("invalid value for 'id_bank', id_bank cannot be nil.")
139
+ if @id_connector.nil?
140
+ invalid_properties.push('invalid value for "id_connector", id_connector cannot be nil.')
134
141
  end
135
142
 
136
143
  if @active.nil?
137
- invalid_properties.push("invalid value for 'active', active cannot be nil.")
144
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
138
145
  end
139
146
 
140
- return invalid_properties
147
+ invalid_properties
141
148
  end
142
149
 
143
150
  # Check to see if the all the properties in the model are valid
144
151
  # @return true if the model is valid
145
152
  def valid?
146
153
  return false if @id.nil?
147
- return false if @id_bank.nil?
154
+ return false if @id_connector.nil?
148
155
  return false if @active.nil?
149
- return true
156
+ true
150
157
  end
151
158
 
152
159
  # Checks equality by comparing each attribute.
@@ -156,7 +163,7 @@ module BudgeaClient
156
163
  self.class == o.class &&
157
164
  id == o.id &&
158
165
  id_user == o.id_user &&
159
- id_bank == o.id_bank &&
166
+ id_connector == o.id_connector &&
160
167
  last_update == o.last_update &&
161
168
  error == o.error &&
162
169
  expire == o.expire &&
@@ -175,7 +182,7 @@ module BudgeaClient
175
182
  # Calculates hash code according to all attributes.
176
183
  # @return [Fixnum] Hash code
177
184
  def hash
178
- [id, id_user, id_bank, last_update, error, expire, active, last_push, next_try, accounts].hash
185
+ [id, id_user, id_connector, last_update, error, expire, active, last_push, next_try, accounts].hash
179
186
  end
180
187
 
181
188
  # Builds the object from hash
@@ -188,7 +195,7 @@ module BudgeaClient
188
195
  # check to ensure the input is an array given that the the attribute
189
196
  # is documented as an array but the input is not
190
197
  if attributes[self.class.attribute_map[key]].is_a?(Array)
191
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
198
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
192
199
  end
193
200
  elsif !attributes[self.class.attribute_map[key]].nil?
194
201
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -270,7 +277,7 @@ module BudgeaClient
270
277
  # @return [Hash] Returns the value in the form of hash
271
278
  def _to_hash(value)
272
279
  if value.is_a?(Array)
273
- value.compact.map{ |v| _to_hash(v) }
280
+ value.compact.map { |v| _to_hash(v) }
274
281
  elsif value.is_a?(Hash)
275
282
  {}.tap do |hash|
276
283
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -281,7 +288,5 @@ module BudgeaClient
281
288
  value
282
289
  end
283
290
  end
284
-
285
291
  end
286
-
287
292
  end
@@ -1,9 +1,18 @@
1
- # frozen_string_literal: true
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 ConnectionLog
8
17
  # ID of the log
9
18
  attr_accessor :id
@@ -14,8 +23,8 @@ module BudgeaClient
14
23
  # ID of the connection
15
24
  attr_accessor :id_connection
16
25
 
17
- # ID of the bank
18
- attr_accessor :id_bank
26
+ # ID of the connector
27
+ attr_accessor :id_connector
19
28
 
20
29
  # bcrypt hash of the login
21
30
  attr_accessor :login
@@ -32,7 +41,7 @@ module BudgeaClient
32
41
  # If fail, contains the error code
33
42
  attr_accessor :error
34
43
 
35
- # If fail, error message received from bank or provider
44
+ # If fail, error message received from connector
36
45
  attr_accessor :error_message
37
46
 
38
47
  # Status of user (1 = charged user)
@@ -47,6 +56,8 @@ module BudgeaClient
47
56
  # Worker used to do synchronization
48
57
  attr_accessor :worker
49
58
 
59
+ # Session folder uid
60
+ attr_accessor :session_folder_id
50
61
 
51
62
  # Attribute mapping from ruby-style variable name to JSON key.
52
63
  def self.attribute_map
@@ -54,7 +65,7 @@ module BudgeaClient
54
65
  :'id' => :'id',
55
66
  :'id_user' => :'id_user',
56
67
  :'id_connection' => :'id_connection',
57
- :'id_bank' => :'id_bank',
68
+ :'id_connector' => :'id_connector',
58
69
  :'login' => :'login',
59
70
  :'error_uid' => :'error_uid',
60
71
  :'timestamp' => :'timestamp',
@@ -64,7 +75,8 @@ module BudgeaClient
64
75
  :'statut' => :'statut',
65
76
  :'nb_accounts' => :'nb_accounts',
66
77
  :'start' => :'start',
67
- :'worker' => :'worker'
78
+ :'worker' => :'worker',
79
+ :'session_folder_id' => :'session_folder_id'
68
80
  }
69
81
  end
70
82
 
@@ -74,7 +86,7 @@ module BudgeaClient
74
86
  :'id' => :'Integer',
75
87
  :'id_user' => :'Integer',
76
88
  :'id_connection' => :'Integer',
77
- :'id_bank' => :'Integer',
89
+ :'id_connector' => :'Integer',
78
90
  :'login' => :'String',
79
91
  :'error_uid' => :'String',
80
92
  :'timestamp' => :'DateTime',
@@ -84,7 +96,8 @@ module BudgeaClient
84
96
  :'statut' => :'Integer',
85
97
  :'nb_accounts' => :'Integer',
86
98
  :'start' => :'DateTime',
87
- :'worker' => :'String'
99
+ :'worker' => :'String',
100
+ :'session_folder_id' => :'String'
88
101
  }
89
102
  end
90
103
 
@@ -94,7 +107,7 @@ module BudgeaClient
94
107
  return unless attributes.is_a?(Hash)
95
108
 
96
109
  # convert string to symbol for hash key
97
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
110
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
98
111
 
99
112
  if attributes.has_key?(:'id')
100
113
  self.id = attributes[:'id']
@@ -108,8 +121,8 @@ module BudgeaClient
108
121
  self.id_connection = attributes[:'id_connection']
109
122
  end
110
123
 
111
- if attributes.has_key?(:'id_bank')
112
- self.id_bank = attributes[:'id_bank']
124
+ if attributes.has_key?(:'id_connector')
125
+ self.id_connector = attributes[:'id_connector']
113
126
  end
114
127
 
115
128
  if attributes.has_key?(:'login')
@@ -152,6 +165,9 @@ module BudgeaClient
152
165
  self.worker = attributes[:'worker']
153
166
  end
154
167
 
168
+ if attributes.has_key?(:'session_folder_id')
169
+ self.session_folder_id = attributes[:'session_folder_id']
170
+ end
155
171
  end
156
172
 
157
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -159,18 +175,18 @@ module BudgeaClient
159
175
  def list_invalid_properties
160
176
  invalid_properties = Array.new
161
177
  if @id.nil?
162
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
178
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
163
179
  end
164
180
 
165
181
  if @id_connection.nil?
166
- invalid_properties.push("invalid value for 'id_connection', id_connection cannot be nil.")
182
+ invalid_properties.push('invalid value for "id_connection", id_connection cannot be nil.')
167
183
  end
168
184
 
169
185
  if @timestamp.nil?
170
- invalid_properties.push("invalid value for 'timestamp', timestamp cannot be nil.")
186
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
171
187
  end
172
188
 
173
- return invalid_properties
189
+ invalid_properties
174
190
  end
175
191
 
176
192
  # Check to see if the all the properties in the model are valid
@@ -179,7 +195,7 @@ module BudgeaClient
179
195
  return false if @id.nil?
180
196
  return false if @id_connection.nil?
181
197
  return false if @timestamp.nil?
182
- return true
198
+ true
183
199
  end
184
200
 
185
201
  # Checks equality by comparing each attribute.
@@ -190,7 +206,7 @@ module BudgeaClient
190
206
  id == o.id &&
191
207
  id_user == o.id_user &&
192
208
  id_connection == o.id_connection &&
193
- id_bank == o.id_bank &&
209
+ id_connector == o.id_connector &&
194
210
  login == o.login &&
195
211
  error_uid == o.error_uid &&
196
212
  timestamp == o.timestamp &&
@@ -200,7 +216,8 @@ module BudgeaClient
200
216
  statut == o.statut &&
201
217
  nb_accounts == o.nb_accounts &&
202
218
  start == o.start &&
203
- worker == o.worker
219
+ worker == o.worker &&
220
+ session_folder_id == o.session_folder_id
204
221
  end
205
222
 
206
223
  # @see the `==` method
@@ -212,7 +229,7 @@ module BudgeaClient
212
229
  # Calculates hash code according to all attributes.
213
230
  # @return [Fixnum] Hash code
214
231
  def hash
215
- [id, id_user, id_connection, id_bank, login, error_uid, timestamp, next_try, error, error_message, statut, nb_accounts, start, worker].hash
232
+ [id, id_user, id_connection, id_connector, login, error_uid, timestamp, next_try, error, error_message, statut, nb_accounts, start, worker, session_folder_id].hash
216
233
  end
217
234
 
218
235
  # Builds the object from hash
@@ -225,7 +242,7 @@ module BudgeaClient
225
242
  # check to ensure the input is an array given that the the attribute
226
243
  # is documented as an array but the input is not
227
244
  if attributes[self.class.attribute_map[key]].is_a?(Array)
228
- 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) })
229
246
  end
230
247
  elsif !attributes[self.class.attribute_map[key]].nil?
231
248
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -307,7 +324,7 @@ module BudgeaClient
307
324
  # @return [Hash] Returns the value in the form of hash
308
325
  def _to_hash(value)
309
326
  if value.is_a?(Array)
310
- value.compact.map{ |v| _to_hash(v) }
327
+ value.compact.map { |v| _to_hash(v) }
311
328
  elsif value.is_a?(Hash)
312
329
  {}.tap do |hash|
313
330
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -318,7 +335,5 @@ module BudgeaClient
318
335
  value
319
336
  end
320
337
  end
321
-
322
338
  end
323
-
324
339
  end
@@ -0,0 +1,345 @@
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 Connector
17
+ # ID of the connector
18
+ attr_accessor :id
19
+
20
+ # Name of the bank or provider
21
+ attr_accessor :name
22
+
23
+ attr_accessor :id_weboob
24
+
25
+ # This connector is hidden from your users
26
+ attr_accessor :hidden
27
+
28
+ # Usage of this connector is charged
29
+ attr_accessor :charged
30
+
31
+ # Bank code
32
+ attr_accessor :code
33
+
34
+ # If true, this connector is perhaps unstable :)
35
+ attr_accessor :beta
36
+
37
+ # Main color of the bank or provider
38
+ attr_accessor :color
39
+
40
+ attr_accessor :slug
41
+
42
+ # How many days to wait between syncs
43
+ attr_accessor :sync_frequency
44
+
45
+ # How many months of history to fetch
46
+ attr_accessor :months_to_fetch
47
+
48
+ attr_accessor :account_types
49
+
50
+ # Authentication mechanism to use
51
+ attr_accessor :auth_mechanism
52
+
53
+ attr_accessor :fields
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'id' => :'id',
59
+ :'name' => :'name',
60
+ :'id_weboob' => :'id_weboob',
61
+ :'hidden' => :'hidden',
62
+ :'charged' => :'charged',
63
+ :'code' => :'code',
64
+ :'beta' => :'beta',
65
+ :'color' => :'color',
66
+ :'slug' => :'slug',
67
+ :'sync_frequency' => :'sync_frequency',
68
+ :'months_to_fetch' => :'months_to_fetch',
69
+ :'account_types' => :'account_types',
70
+ :'auth_mechanism' => :'auth_mechanism',
71
+ :'fields' => :'fields'
72
+ }
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.swagger_types
77
+ {
78
+ :'id' => :'Integer',
79
+ :'name' => :'String',
80
+ :'id_weboob' => :'String',
81
+ :'hidden' => :'BOOLEAN',
82
+ :'charged' => :'BOOLEAN',
83
+ :'code' => :'String',
84
+ :'beta' => :'BOOLEAN',
85
+ :'color' => :'String',
86
+ :'slug' => :'String',
87
+ :'sync_frequency' => :'Float',
88
+ :'months_to_fetch' => :'Integer',
89
+ :'account_types' => :'Array<String>',
90
+ :'auth_mechanism' => :'String',
91
+ :'fields' => :'Array<Field>'
92
+ }
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ return unless attributes.is_a?(Hash)
99
+
100
+ # convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
102
+
103
+ if attributes.has_key?(:'id')
104
+ self.id = attributes[:'id']
105
+ end
106
+
107
+ if attributes.has_key?(:'name')
108
+ self.name = attributes[:'name']
109
+ end
110
+
111
+ if attributes.has_key?(:'id_weboob')
112
+ self.id_weboob = attributes[:'id_weboob']
113
+ end
114
+
115
+ if attributes.has_key?(:'hidden')
116
+ self.hidden = attributes[:'hidden']
117
+ else
118
+ self.hidden = false
119
+ end
120
+
121
+ if attributes.has_key?(:'charged')
122
+ self.charged = attributes[:'charged']
123
+ else
124
+ self.charged = true
125
+ end
126
+
127
+ if attributes.has_key?(:'code')
128
+ self.code = attributes[:'code']
129
+ end
130
+
131
+ if attributes.has_key?(:'beta')
132
+ self.beta = attributes[:'beta']
133
+ else
134
+ self.beta = false
135
+ end
136
+
137
+ if attributes.has_key?(:'color')
138
+ self.color = attributes[:'color']
139
+ end
140
+
141
+ if attributes.has_key?(:'slug')
142
+ self.slug = attributes[:'slug']
143
+ end
144
+
145
+ if attributes.has_key?(:'sync_frequency')
146
+ self.sync_frequency = attributes[:'sync_frequency']
147
+ end
148
+
149
+ if attributes.has_key?(:'months_to_fetch')
150
+ self.months_to_fetch = attributes[:'months_to_fetch']
151
+ end
152
+
153
+ if attributes.has_key?(:'account_types')
154
+ if (value = attributes[:'account_types']).is_a?(Array)
155
+ self.account_types = value
156
+ end
157
+ end
158
+
159
+ if attributes.has_key?(:'auth_mechanism')
160
+ self.auth_mechanism = attributes[:'auth_mechanism']
161
+ end
162
+
163
+ if attributes.has_key?(:'fields')
164
+ if (value = attributes[:'fields']).is_a?(Array)
165
+ self.fields = value
166
+ end
167
+ end
168
+ end
169
+
170
+ # Show invalid properties with the reasons. Usually used together with valid?
171
+ # @return Array for valid properties with the reasons
172
+ def list_invalid_properties
173
+ invalid_properties = Array.new
174
+ if @id.nil?
175
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
176
+ end
177
+
178
+ if @name.nil?
179
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
180
+ end
181
+
182
+ if @id_weboob.nil?
183
+ invalid_properties.push('invalid value for "id_weboob", id_weboob cannot be nil.')
184
+ end
185
+
186
+ if @charged.nil?
187
+ invalid_properties.push('invalid value for "charged", charged cannot be nil.')
188
+ end
189
+
190
+ if @beta.nil?
191
+ invalid_properties.push('invalid value for "beta", beta cannot be nil.')
192
+ end
193
+
194
+ invalid_properties
195
+ end
196
+
197
+ # Check to see if the all the properties in the model are valid
198
+ # @return true if the model is valid
199
+ def valid?
200
+ return false if @id.nil?
201
+ return false if @name.nil?
202
+ return false if @id_weboob.nil?
203
+ return false if @charged.nil?
204
+ return false if @beta.nil?
205
+ true
206
+ end
207
+
208
+ # Checks equality by comparing each attribute.
209
+ # @param [Object] Object to be compared
210
+ def ==(o)
211
+ return true if self.equal?(o)
212
+ self.class == o.class &&
213
+ id == o.id &&
214
+ name == o.name &&
215
+ id_weboob == o.id_weboob &&
216
+ hidden == o.hidden &&
217
+ charged == o.charged &&
218
+ code == o.code &&
219
+ beta == o.beta &&
220
+ color == o.color &&
221
+ slug == o.slug &&
222
+ sync_frequency == o.sync_frequency &&
223
+ months_to_fetch == o.months_to_fetch &&
224
+ account_types == o.account_types &&
225
+ auth_mechanism == o.auth_mechanism &&
226
+ fields == o.fields
227
+ end
228
+
229
+ # @see the `==` method
230
+ # @param [Object] Object to be compared
231
+ def eql?(o)
232
+ self == o
233
+ end
234
+
235
+ # Calculates hash code according to all attributes.
236
+ # @return [Fixnum] Hash code
237
+ def hash
238
+ [id, name, id_weboob, hidden, charged, code, beta, color, slug, sync_frequency, months_to_fetch, account_types, auth_mechanism, fields].hash
239
+ end
240
+
241
+ # Builds the object from hash
242
+ # @param [Hash] attributes Model attributes in the form of hash
243
+ # @return [Object] Returns the model itself
244
+ def build_from_hash(attributes)
245
+ return nil unless attributes.is_a?(Hash)
246
+ self.class.swagger_types.each_pair do |key, type|
247
+ if type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
251
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
252
+ end
253
+ elsif !attributes[self.class.attribute_map[key]].nil?
254
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
255
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
256
+ end
257
+
258
+ self
259
+ end
260
+
261
+ # Deserializes the data based on type
262
+ # @param string type Data type
263
+ # @param string value Value to be deserialized
264
+ # @return [Object] Deserialized data
265
+ def _deserialize(type, value)
266
+ case type.to_sym
267
+ when :DateTime
268
+ DateTime.parse(value)
269
+ when :Date
270
+ Date.parse(value)
271
+ when :String
272
+ value.to_s
273
+ when :Integer
274
+ value.to_i
275
+ when :Float
276
+ value.to_f
277
+ when :BOOLEAN
278
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
279
+ true
280
+ else
281
+ false
282
+ end
283
+ when :Object
284
+ # generic object (usually a Hash), return directly
285
+ value
286
+ when /\AArray<(?<inner_type>.+)>\z/
287
+ inner_type = Regexp.last_match[:inner_type]
288
+ value.map { |v| _deserialize(inner_type, v) }
289
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
290
+ k_type = Regexp.last_match[:k_type]
291
+ v_type = Regexp.last_match[:v_type]
292
+ {}.tap do |hash|
293
+ value.each do |k, v|
294
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
295
+ end
296
+ end
297
+ else # model
298
+ temp_model = BudgeaClient.const_get(type).new
299
+ temp_model.build_from_hash(value)
300
+ end
301
+ end
302
+
303
+ # Returns the string representation of the object
304
+ # @return [String] String presentation of the object
305
+ def to_s
306
+ to_hash.to_s
307
+ end
308
+
309
+ # to_body is an alias to to_hash (backward compatibility)
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_body
312
+ to_hash
313
+ end
314
+
315
+ # Returns the object in the form of hash
316
+ # @return [Hash] Returns the object in the form of hash
317
+ def to_hash
318
+ hash = {}
319
+ self.class.attribute_map.each_pair do |attr, param|
320
+ value = self.send(attr)
321
+ next if value.nil?
322
+ hash[param] = _to_hash(value)
323
+ end
324
+ hash
325
+ end
326
+
327
+ # Outputs non-array value in the form of hash
328
+ # For object, use to_hash. Otherwise, just return the value
329
+ # @param [Object] value Any valid value
330
+ # @return [Hash] Returns the value in the form of hash
331
+ def _to_hash(value)
332
+ if value.is_a?(Array)
333
+ value.compact.map { |v| _to_hash(v) }
334
+ elsif value.is_a?(Hash)
335
+ {}.tap do |hash|
336
+ value.each { |k, v| hash[k] = _to_hash(v) }
337
+ end
338
+ elsif value.respond_to? :to_hash
339
+ value.to_hash
340
+ else
341
+ value
342
+ end
343
+ end
344
+ end
345
+ end