app_token_api 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/app_token_api.gemspec +1 -1
  4. data/lib/admin_api/api/app_token_api.rb +2 -2
  5. data/lib/admin_api/api/auto_generate_app_token_api.rb +2 -2
  6. data/lib/admin_api/api/card_api.rb +371 -0
  7. data/lib/admin_api/api/client_api.rb +368 -0
  8. data/lib/admin_api/api_client.rb +2 -2
  9. data/lib/admin_api/api_error.rb +1 -1
  10. data/lib/admin_api/auth_configuration.rb +4 -4
  11. data/lib/admin_api/configuration.rb +2 -2
  12. data/lib/admin_api/models/app_token.rb +1 -1
  13. data/lib/admin_api/models/card.rb +499 -0
  14. data/lib/admin_api/models/card_address.rb +271 -0
  15. data/lib/admin_api/models/client.rb +557 -0
  16. data/lib/admin_api/models/client_address.rb +281 -0
  17. data/lib/admin_api/models/employment.rb +216 -0
  18. data/lib/admin_api/models/page_card.rb +261 -0
  19. data/lib/admin_api/models/page_client.rb +261 -0
  20. data/lib/admin_api/models/sort.rb +236 -0
  21. data/lib/admin_api/version.rb +2 -2
  22. data/lib/admin_api.rb +1 -1
  23. data/spec/api/app_token_api_spec.rb +1 -1
  24. data/spec/api/card_api_spec.rb +88 -0
  25. data/spec/api/client_api_spec.rb +20 -27
  26. data/spec/api_client_spec.rb +1 -1
  27. data/spec/configuration_spec.rb +4 -4
  28. data/spec/models/app_token_spec.rb +1 -1
  29. data/spec/models/card_address_spec.rb +77 -0
  30. data/spec/models/card_spec.rb +215 -0
  31. data/spec/models/client_address_spec.rb +83 -0
  32. data/spec/models/client_spec.rb +162 -6
  33. data/spec/models/employment_spec.rb +59 -0
  34. data/spec/models/page_card_spec.rb +89 -0
  35. data/spec/models/page_client_spec.rb +1 -1
  36. data/spec/models/sort_spec.rb +1 -1
  37. data/spec/spec_helper.rb +1 -1
  38. metadata +24 -2
@@ -0,0 +1,368 @@
1
+ =begin
2
+ #Hydrogen Admin API
3
+
4
+ #The Hydrogen Admin API
5
+
6
+ OpenAPI spec version: 1.0.2
7
+ Contact: info@hydrogenplatform.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module AdminApi
16
+ class ClientApi
17
+ attr_accessor :api_client
18
+ attr_accessor :auth_config
19
+
20
+ def initialize(api_client = ApiClient.default, auth_config = AuthConfiguration.default)
21
+ @api_client = api_client
22
+ @auth_config = auth_config
23
+ end
24
+
25
+
26
+ def create_client_credential_return(appTokenConfig)
27
+ client_credentials_token = @auth_config.create_client_credential_return(appTokenConfig['clientId'], appTokenConfig['clientSecret'])
28
+ if @api_client.config.debugging
29
+ @api_client.config.logger.debug "API called: AppTokenApi#client_credentials_token\nData: #{client_credentials_token.inspect}"
30
+ end
31
+ return client_credentials_token
32
+ end
33
+
34
+ def create_password_credential_return(appTokenConfig)
35
+
36
+ password_credentials_token = @auth_config.create_password_credential_return(appTokenConfig['clientId'], appTokenConfig['clientSecret'],appTokenConfig['username'], appTokenConfig['password'] )
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug "API called: AppTokenApi#password_credentials_token\nData: #{password_credentials_token.inspect}"
39
+ end
40
+ return password_credentials_token
41
+ end
42
+
43
+ def create_client_token_credential_return(appTokenConfig)
44
+
45
+ client_token_credentials = @auth_config.create_client_token_credential(appTokenConfig['clientId'], appTokenConfig['clientSecret'],appTokenConfig['clientToken'])
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug "API called: AppTokenApi#client_token_credentials\nData: #{client_token_credentials.inspect}"
48
+ end
49
+ return client_token_credentials
50
+ end
51
+
52
+ # Create a client
53
+ # Create a new client, or register a new user, with your firm.
54
+ # @param client_request clientRequest
55
+ # @param [Hash] opts the optional parameters
56
+ # @return [Client]
57
+ def create_client_using_post(client_request, appTokenConfig = {}, opts = {})
58
+ data, _status_code, _headers = create_client_using_post_with_http_info(client_request, appTokenConfig, opts)
59
+ data
60
+ end
61
+
62
+ # Create a client
63
+ # Create a new client, or register a new user, with your firm.
64
+ # @param client_request clientRequest
65
+ # @param [Hash] opts the optional parameters
66
+ # @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
67
+ def create_client_using_post_with_http_info(client_request, appTokenConfig = {}, opts = {})
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug 'Calling API: ClientApi.create_client_using_post ...'
70
+ end
71
+ # verify the required parameter 'client_request' is set
72
+ if @api_client.config.client_side_validation && client_request.nil?
73
+ fail ArgumentError, "Missing the required parameter 'client_request' when calling ClientApi.create_client_using_post"
74
+ end
75
+ # resource path
76
+ local_var_path = '/nucleus/v1/client'
77
+
78
+ # query parameters
79
+ query_params = {}
80
+
81
+ # header parameters
82
+ header_params = {}
83
+ # HTTP header 'Accept' (if needed)
84
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
85
+ # HTTP header 'Content-Type'
86
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
87
+
88
+ # form parameters
89
+ form_params = {}
90
+
91
+ # http body (model)
92
+ post_body = @api_client.object_to_http_body(client_request)
93
+ auth_names = ['oauth2']
94
+
95
+ if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
96
+ fail ArgumentError, "Missing the required parameter 'basePath'"
97
+ end
98
+
99
+ if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
100
+ fail ArgumentError, "Missing the required parameter 'authType'"
101
+ end
102
+
103
+ @auth_config.config.host = appTokenConfig['basePath']
104
+ @api_client.config.host = appTokenConfig['basePath']
105
+
106
+ if appTokenConfig['authType'].downcase == 'client_credentials'
107
+ client_credentials_token = create_client_credential_return(appTokenConfig)
108
+ @api_client.config.access_token = client_credentials_token
109
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
110
+ password_credential_token = create_password_credential_return(appTokenConfig)
111
+ @api_client.config.access_token = password_credential_token
112
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
113
+ client_token_credential = create_client_token_credential_return(appTokenConfig)
114
+ @api_client.config.access_token = client_token_credential
115
+ end
116
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
117
+ :header_params => header_params,
118
+ :query_params => query_params,
119
+ :form_params => form_params,
120
+ :body => post_body,
121
+ :auth_names => auth_names,
122
+ :return_type => 'Client')
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug "API called: ClientApi#create_client_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
125
+ end
126
+ return data, status_code, headers
127
+ end
128
+ # List all clients
129
+ # Get details for all clients registered with your firm.
130
+ # @param [Hash] opts the optional parameters
131
+ # @option opts [BOOLEAN] :ascending ascending (default to false)
132
+ # @option opts [String] :filter filter
133
+ # @option opts [String] :order_by order_by (default to update_date)
134
+ # @option opts [Integer] :page page (default to 0)
135
+ # @option opts [Integer] :size size (default to 25)
136
+ # @return [PageClient]
137
+ def get_client_all_using_get(appTokenConfig = {}, opts = {})
138
+ data, _status_code, _headers = get_client_all_using_get_with_http_info(appTokenConfig, opts)
139
+ data
140
+ end
141
+
142
+ # List all clients
143
+ # Get details for all clients registered with your firm.
144
+ # @param [Hash] opts the optional parameters
145
+ # @option opts [BOOLEAN] :ascending ascending
146
+ # @option opts [String] :filter filter
147
+ # @option opts [String] :order_by order_by
148
+ # @option opts [Integer] :page page
149
+ # @option opts [Integer] :size size
150
+ # @return [Array<(PageClient, Fixnum, Hash)>] PageClient data, response status code and response headers
151
+ def get_client_all_using_get_with_http_info(appTokenConfig = {}, opts = {})
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug 'Calling API: ClientApi.get_client_all_using_get ...'
154
+ end
155
+ # resource path
156
+ local_var_path = '/nucleus/v1/client'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+ query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
161
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
162
+ query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
163
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
164
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
165
+
166
+ # header parameters
167
+ header_params = {}
168
+ # HTTP header 'Accept' (if needed)
169
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
170
+
171
+ # form parameters
172
+ form_params = {}
173
+
174
+ # http body (model)
175
+ post_body = nil
176
+ auth_names = ['oauth2']
177
+
178
+ if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
179
+ fail ArgumentError, "Missing the required parameter 'basePath'"
180
+ end
181
+
182
+ if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
183
+ fail ArgumentError, "Missing the required parameter 'authType'"
184
+ end
185
+
186
+ @auth_config.config.host = appTokenConfig['basePath']
187
+ @api_client.config.host = appTokenConfig['basePath']
188
+
189
+ if appTokenConfig['authType'].downcase == 'client_credentials'
190
+ client_credentials_token = create_client_credential_return(appTokenConfig)
191
+ @api_client.config.access_token = client_credentials_token
192
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
193
+ password_credential_token = create_password_credential_return(appTokenConfig)
194
+ @api_client.config.access_token = password_credential_token
195
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
196
+ client_token_credential = create_client_token_credential_return(appTokenConfig)
197
+ @api_client.config.access_token = client_token_credential
198
+ end
199
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
200
+ :header_params => header_params,
201
+ :query_params => query_params,
202
+ :form_params => form_params,
203
+ :body => post_body,
204
+ :auth_names => auth_names,
205
+ :return_type => 'PageClient')
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: ClientApi#get_client_all_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+ # Retrieve a client
212
+ # Retrieve the information for a client registered with your firm.
213
+ # @param client_id UUID client_id
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Client]
216
+ def get_client_using_get(client_id, appTokenConfig = {}, opts = {})
217
+ data, _status_code, _headers = get_client_using_get_with_http_info(client_id, appTokenConfig, opts)
218
+ data
219
+ end
220
+
221
+ # Retrieve a client
222
+ # Retrieve the information for a client registered with your firm.
223
+ # @param client_id UUID client_id
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
226
+ def get_client_using_get_with_http_info(client_id, appTokenConfig = {}, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: ClientApi.get_client_using_get ...'
229
+ end
230
+ # verify the required parameter 'client_id' is set
231
+ if @api_client.config.client_side_validation && client_id.nil?
232
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ClientApi.get_client_using_get"
233
+ end
234
+ # resource path
235
+ local_var_path = '/nucleus/v1/client/{client_id}'.sub('{' + 'client_id' + '}', client_id.to_s)
236
+
237
+ # query parameters
238
+ query_params = {}
239
+
240
+ # header parameters
241
+ header_params = {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
244
+
245
+ # form parameters
246
+ form_params = {}
247
+
248
+ # http body (model)
249
+ post_body = nil
250
+ auth_names = ['oauth2']
251
+
252
+ if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
253
+ fail ArgumentError, "Missing the required parameter 'basePath'"
254
+ end
255
+
256
+ if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
257
+ fail ArgumentError, "Missing the required parameter 'authType'"
258
+ end
259
+
260
+ @auth_config.config.host = appTokenConfig['basePath']
261
+ @api_client.config.host = appTokenConfig['basePath']
262
+
263
+ if appTokenConfig['authType'].downcase == 'client_credentials'
264
+ client_credentials_token = create_client_credential_return(appTokenConfig)
265
+ @api_client.config.access_token = client_credentials_token
266
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
267
+ password_credential_token = create_password_credential_return(appTokenConfig)
268
+ @api_client.config.access_token = password_credential_token
269
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
270
+ client_token_credential = create_client_token_credential_return(appTokenConfig)
271
+ @api_client.config.access_token = client_token_credential
272
+ end
273
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => 'Client')
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: ClientApi#get_client_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+ # Update a client
286
+ # Update the information for a client registered with your firm.
287
+ # @param client client
288
+ # @param client_id UUID client_id
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [Client]
291
+ def update_client_using_put(client, client_id, appTokenConfig = {}, opts = {})
292
+ data, _status_code, _headers = update_client_using_put_with_http_info(client, client_id, appTokenConfig, opts)
293
+ data
294
+ end
295
+
296
+ # Update a client
297
+ # Update the information for a client registered with your firm.
298
+ # @param client client
299
+ # @param client_id UUID client_id
300
+ # @param [Hash] opts the optional parameters
301
+ # @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
302
+ def update_client_using_put_with_http_info(client, client_id, appTokenConfig = {}, opts = {})
303
+ if @api_client.config.debugging
304
+ @api_client.config.logger.debug 'Calling API: ClientApi.update_client_using_put ...'
305
+ end
306
+ # verify the required parameter 'client' is set
307
+ if @api_client.config.client_side_validation && client.nil?
308
+ fail ArgumentError, "Missing the required parameter 'client' when calling ClientApi.update_client_using_put"
309
+ end
310
+ # verify the required parameter 'client_id' is set
311
+ if @api_client.config.client_side_validation && client_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ClientApi.update_client_using_put"
313
+ end
314
+ # resource path
315
+ local_var_path = '/nucleus/v1/client/{client_id}'.sub('{' + 'client_id' + '}', client_id.to_s)
316
+
317
+ # query parameters
318
+ query_params = {}
319
+
320
+ # header parameters
321
+ header_params = {}
322
+ # HTTP header 'Accept' (if needed)
323
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
324
+ # HTTP header 'Content-Type'
325
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
326
+
327
+ # form parameters
328
+ form_params = {}
329
+
330
+ # http body (model)
331
+ post_body = @api_client.object_to_http_body(client)
332
+ auth_names = ['oauth2']
333
+
334
+ if @api_client.config.client_side_validation && appTokenConfig['basePath'].nil?
335
+ fail ArgumentError, "Missing the required parameter 'basePath'"
336
+ end
337
+
338
+ if @api_client.config.client_side_validation && appTokenConfig['authType'].nil?
339
+ fail ArgumentError, "Missing the required parameter 'authType'"
340
+ end
341
+
342
+ @auth_config.config.host = appTokenConfig['basePath']
343
+ @api_client.config.host = appTokenConfig['basePath']
344
+
345
+ if appTokenConfig['authType'].downcase == 'client_credentials'
346
+ client_credentials_token = create_client_credential_return(appTokenConfig)
347
+ @api_client.config.access_token = client_credentials_token
348
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
349
+ password_credential_token = create_password_credential_return(appTokenConfig)
350
+ @api_client.config.access_token = password_credential_token
351
+ elsif appTokenConfig['authType'].downcase == 'password_credentials'
352
+ client_token_credential = create_client_token_credential_return(appTokenConfig)
353
+ @api_client.config.access_token = client_token_credential
354
+ end
355
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
356
+ :header_params => header_params,
357
+ :query_params => query_params,
358
+ :form_params => form_params,
359
+ :body => post_body,
360
+ :auth_names => auth_names,
361
+ :return_type => 'Client')
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug "API called: ClientApi#update_client_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
364
+ end
365
+ return data, status_code, headers
366
+ end
367
+ end
368
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Hydrogen Admin API
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.0.2
7
7
  Contact: info@hydrogenplatform.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.15
@@ -316,7 +316,7 @@ module AdminApi
316
316
 
317
317
  # Sets user agent in HTTP header
318
318
  #
319
- # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
319
+ # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.2)
320
320
  def user_agent=(user_agent)
321
321
  @user_agent = user_agent
322
322
  @default_headers['User-Agent'] = @user_agent
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Hydrogen Admin API
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.0.2
7
7
  Contact: info@hydrogenplatform.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.15
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #Hydrogen Atom API
2
+ #Hydrogen Admin API
3
3
 
4
- #The Hydrogen Atom API
4
+ #The Hydrogen Admin API
5
5
 
6
- OpenAPI spec version: 1.7.0
6
+ OpenAPI spec version: 1.0.2
7
7
  Contact: info@hydrogenplatform.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.13
9
+ Swagger Codegen version: 2.4.15
10
10
 
11
11
  =end
12
12
  require 'date'
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Hydrogen Admin API
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.0.2
7
7
  Contact: info@hydrogenplatform.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.15
@@ -130,7 +130,7 @@ module AdminApi
130
130
  def initialize
131
131
  @scheme = 'https'
132
132
  @host = 'api.hydrogenplatform.com'
133
- @base_path = '/admin/v1'
133
+ @base_path = ''
134
134
  @api_key = {}
135
135
  @api_key_prefix = {}
136
136
  @timeout = 0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Hydrogen Admin API
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.0.2
7
7
  Contact: info@hydrogenplatform.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.15