ultracart_api 4.1.12 → 4.1.14

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.
data/docs/UserApi.md CHANGED
@@ -1,790 +1,606 @@
1
- # UltracartClient::UserApi
2
-
3
- All URIs are relative to *https://secure.ultracart.com/rest/v2*
4
-
5
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**delete_group**](UserApi.md#delete_group) | **DELETE** /user/groups/{group_oid} | Delete a group |
8
- | [**delete_user**](UserApi.md#delete_user) | **DELETE** /user/users/{user_id} | Delete a user |
9
- | [**get_group**](UserApi.md#get_group) | **GET** /user/groups/{group_oid} | Retrieve a group |
10
- | [**get_groups**](UserApi.md#get_groups) | **GET** /user/groups | Get groups |
11
- | [**get_user**](UserApi.md#get_user) | **GET** /user/users/{user_id} | Retrieve a user |
12
- | [**get_user_logins**](UserApi.md#get_user_logins) | **GET** /user/users/{user_id}/logins | Retrieve a user's login history |
13
- | [**get_users**](UserApi.md#get_users) | **GET** /user/users | Get users |
14
- | [**insert_group**](UserApi.md#insert_group) | **POST** /user/groups | Insert a group |
15
- | [**insert_user**](UserApi.md#insert_user) | **POST** /user/users | Insert a user |
16
- | [**update_group**](UserApi.md#update_group) | **PUT** /user/groups/{group_oid} | Update a group |
17
- | [**update_user**](UserApi.md#update_user) | **PUT** /user/users/{user_id} | Update a user |
18
-
19
-
20
- ## delete_group
21
-
22
- > delete_group(group_oid)
23
-
24
- Delete a group
25
-
26
- Delete a group on the UltraCart account.
27
-
28
- ### Examples
29
-
30
- ```ruby
31
- require 'time'
32
- require 'ultracart_api'
33
- require 'json'
34
- require 'yaml'
35
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
36
-
37
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
38
- # As such, this might not be the best way to use this object.
39
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
40
-
41
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
42
- group_oid = 56 # Integer | The group_oid to delete.
43
-
44
- begin
45
- # Delete a group
46
- api_instance.delete_group(group_oid)
47
- rescue UltracartClient::ApiError => e
48
- puts "Error when calling UserApi->delete_group: #{e}"
49
- end
50
- ```
51
-
52
- #### Using the delete_group_with_http_info variant
53
-
54
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
55
-
56
- > <Array(nil, Integer, Hash)> delete_group_with_http_info(group_oid)
57
-
58
- ```ruby
59
- begin
60
- # Delete a group
61
- data, status_code, headers = api_instance.delete_group_with_http_info(group_oid)
62
- p status_code # => 2xx
63
- p headers # => { ... }
64
- p data # => nil
65
- rescue UltracartClient::ApiError => e
66
- puts "Error when calling UserApi->delete_group_with_http_info: #{e}"
67
- end
68
- ```
69
-
70
- ### Parameters
71
-
72
- | Name | Type | Description | Notes |
73
- | ---- | ---- | ----------- | ----- |
74
- | **group_oid** | **Integer** | The group_oid to delete. | |
75
-
76
- ### Return type
77
-
78
- nil (empty response body)
79
-
80
- ### Authorization
81
-
82
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
83
-
84
- ### HTTP request headers
85
-
86
- - **Content-Type**: Not defined
87
- - **Accept**: application/json
88
-
89
-
90
- ## delete_user
91
-
92
- > delete_user(user_id)
93
-
94
- Delete a user
95
-
96
- Delete a user on the UltraCart account.
97
-
98
- ### Examples
99
-
100
- ```ruby
101
- require 'time'
102
- require 'ultracart_api'
103
- require 'json'
104
- require 'yaml'
105
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
106
-
107
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
108
- # As such, this might not be the best way to use this object.
109
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
110
-
111
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
112
- user_id = 56 # Integer | The user_id to delete.
113
-
114
- begin
115
- # Delete a user
116
- api_instance.delete_user(user_id)
117
- rescue UltracartClient::ApiError => e
118
- puts "Error when calling UserApi->delete_user: #{e}"
119
- end
120
- ```
121
-
122
- #### Using the delete_user_with_http_info variant
123
-
124
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
125
-
126
- > <Array(nil, Integer, Hash)> delete_user_with_http_info(user_id)
127
-
128
- ```ruby
129
- begin
130
- # Delete a user
131
- data, status_code, headers = api_instance.delete_user_with_http_info(user_id)
132
- p status_code # => 2xx
133
- p headers # => { ... }
134
- p data # => nil
135
- rescue UltracartClient::ApiError => e
136
- puts "Error when calling UserApi->delete_user_with_http_info: #{e}"
137
- end
138
- ```
139
-
140
- ### Parameters
141
-
142
- | Name | Type | Description | Notes |
143
- | ---- | ---- | ----------- | ----- |
144
- | **user_id** | **Integer** | The user_id to delete. | |
145
-
146
- ### Return type
147
-
148
- nil (empty response body)
149
-
150
- ### Authorization
151
-
152
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
153
-
154
- ### HTTP request headers
155
-
156
- - **Content-Type**: Not defined
157
- - **Accept**: application/json
158
-
159
-
160
- ## get_group
161
-
162
- > get_group(group_oid)
163
-
164
- Retrieve a group
165
-
166
- Retrieves a single group using the specified group id.
167
-
168
- ### Examples
169
-
170
- ```ruby
171
- require 'time'
172
- require 'ultracart_api'
173
- require 'json'
174
- require 'yaml'
175
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
176
-
177
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
178
- # As such, this might not be the best way to use this object.
179
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
180
-
181
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
182
- group_oid = 56 # Integer | The group id to retrieve.
183
-
184
- begin
185
- # Retrieve a group
186
- api_instance.get_group(group_oid)
187
- rescue UltracartClient::ApiError => e
188
- puts "Error when calling UserApi->get_group: #{e}"
189
- end
190
- ```
191
-
192
- #### Using the get_group_with_http_info variant
193
-
194
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
195
-
196
- > <Array(nil, Integer, Hash)> get_group_with_http_info(group_oid)
197
-
198
- ```ruby
199
- begin
200
- # Retrieve a group
201
- data, status_code, headers = api_instance.get_group_with_http_info(group_oid)
202
- p status_code # => 2xx
203
- p headers # => { ... }
204
- p data # => nil
205
- rescue UltracartClient::ApiError => e
206
- puts "Error when calling UserApi->get_group_with_http_info: #{e}"
207
- end
208
- ```
209
-
210
- ### Parameters
211
-
212
- | Name | Type | Description | Notes |
213
- | ---- | ---- | ----------- | ----- |
214
- | **group_oid** | **Integer** | The group id to retrieve. | |
215
-
216
- ### Return type
217
-
218
- nil (empty response body)
219
-
220
- ### Authorization
221
-
222
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
223
-
224
- ### HTTP request headers
225
-
226
- - **Content-Type**: Not defined
227
- - **Accept**: application/json
228
-
229
-
230
- ## get_groups
231
-
232
- > <GroupsResponse> get_groups
233
-
234
- Get groups
235
-
236
- ### Examples
237
-
238
- ```ruby
239
- require 'time'
240
- require 'ultracart_api'
241
- require 'json'
242
- require 'yaml'
243
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
244
-
245
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
246
- # As such, this might not be the best way to use this object.
247
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
248
-
249
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
250
-
251
- begin
252
- # Get groups
253
- result = api_instance.get_groups
254
- p result
255
- rescue UltracartClient::ApiError => e
256
- puts "Error when calling UserApi->get_groups: #{e}"
257
- end
258
- ```
259
-
260
- #### Using the get_groups_with_http_info variant
261
-
262
- This returns an Array which contains the response data, status code and headers.
263
-
264
- > <Array(<GroupsResponse>, Integer, Hash)> get_groups_with_http_info
265
-
266
- ```ruby
267
- begin
268
- # Get groups
269
- data, status_code, headers = api_instance.get_groups_with_http_info
270
- p status_code # => 2xx
271
- p headers # => { ... }
272
- p data # => <GroupsResponse>
273
- rescue UltracartClient::ApiError => e
274
- puts "Error when calling UserApi->get_groups_with_http_info: #{e}"
275
- end
276
- ```
277
-
278
- ### Parameters
279
-
280
- This endpoint does not need any parameter.
281
-
282
- ### Return type
283
-
284
- [**GroupsResponse**](GroupsResponse.md)
285
-
286
- ### Authorization
287
-
288
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
289
-
290
- ### HTTP request headers
291
-
292
- - **Content-Type**: Not defined
293
- - **Accept**: application/json
294
-
295
-
296
- ## get_user
297
-
298
- > <UserResponse> get_user(user_id)
299
-
300
- Retrieve a user
301
-
302
- Retrieves a single user using the specified user id.
303
-
304
- ### Examples
305
-
306
- ```ruby
307
- require 'time'
308
- require 'ultracart_api'
309
- require 'json'
310
- require 'yaml'
311
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
312
-
313
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
314
- # As such, this might not be the best way to use this object.
315
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
316
-
317
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
318
- user_id = 56 # Integer | The user id to retrieve.
319
-
320
- begin
321
- # Retrieve a user
322
- result = api_instance.get_user(user_id)
323
- p result
324
- rescue UltracartClient::ApiError => e
325
- puts "Error when calling UserApi->get_user: #{e}"
326
- end
327
- ```
328
-
329
- #### Using the get_user_with_http_info variant
330
-
331
- This returns an Array which contains the response data, status code and headers.
332
-
333
- > <Array(<UserResponse>, Integer, Hash)> get_user_with_http_info(user_id)
334
-
335
- ```ruby
336
- begin
337
- # Retrieve a user
338
- data, status_code, headers = api_instance.get_user_with_http_info(user_id)
339
- p status_code # => 2xx
340
- p headers # => { ... }
341
- p data # => <UserResponse>
342
- rescue UltracartClient::ApiError => e
343
- puts "Error when calling UserApi->get_user_with_http_info: #{e}"
344
- end
345
- ```
346
-
347
- ### Parameters
348
-
349
- | Name | Type | Description | Notes |
350
- | ---- | ---- | ----------- | ----- |
351
- | **user_id** | **Integer** | The user id to retrieve. | |
352
-
353
- ### Return type
354
-
355
- [**UserResponse**](UserResponse.md)
356
-
357
- ### Authorization
358
-
359
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
360
-
361
- ### HTTP request headers
362
-
363
- - **Content-Type**: Not defined
364
- - **Accept**: application/json
365
-
366
-
367
- ## get_user_logins
368
-
369
- > <UserLoginsResponse> get_user_logins(user_id)
370
-
371
- Retrieve a user's login history
372
-
373
- Retrieves logins for a single user using the specified user id.
374
-
375
- ### Examples
376
-
377
- ```ruby
378
- require 'time'
379
- require 'ultracart_api'
380
- require 'json'
381
- require 'yaml'
382
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
383
-
384
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
385
- # As such, this might not be the best way to use this object.
386
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
387
-
388
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
389
- user_id = 56 # Integer | The user id to retrieve.
390
-
391
- begin
392
- # Retrieve a user's login history
393
- result = api_instance.get_user_logins(user_id)
394
- p result
395
- rescue UltracartClient::ApiError => e
396
- puts "Error when calling UserApi->get_user_logins: #{e}"
397
- end
398
- ```
399
-
400
- #### Using the get_user_logins_with_http_info variant
401
-
402
- This returns an Array which contains the response data, status code and headers.
403
-
404
- > <Array(<UserLoginsResponse>, Integer, Hash)> get_user_logins_with_http_info(user_id)
405
-
406
- ```ruby
407
- begin
408
- # Retrieve a user's login history
409
- data, status_code, headers = api_instance.get_user_logins_with_http_info(user_id)
410
- p status_code # => 2xx
411
- p headers # => { ... }
412
- p data # => <UserLoginsResponse>
413
- rescue UltracartClient::ApiError => e
414
- puts "Error when calling UserApi->get_user_logins_with_http_info: #{e}"
415
- end
416
- ```
417
-
418
- ### Parameters
419
-
420
- | Name | Type | Description | Notes |
421
- | ---- | ---- | ----------- | ----- |
422
- | **user_id** | **Integer** | The user id to retrieve. | |
423
-
424
- ### Return type
425
-
426
- [**UserLoginsResponse**](UserLoginsResponse.md)
427
-
428
- ### Authorization
429
-
430
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
431
-
432
- ### HTTP request headers
433
-
434
- - **Content-Type**: Not defined
435
- - **Accept**: application/json
436
-
437
-
438
- ## get_users
439
-
440
- > <UsersResponse> get_users
441
-
442
- Get users
443
-
444
- ### Examples
445
-
446
- ```ruby
447
- require 'time'
448
- require 'ultracart_api'
449
- require 'json'
450
- require 'yaml'
451
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
452
-
453
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
454
- # As such, this might not be the best way to use this object.
455
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
456
-
457
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
458
-
459
- begin
460
- # Get users
461
- result = api_instance.get_users
462
- p result
463
- rescue UltracartClient::ApiError => e
464
- puts "Error when calling UserApi->get_users: #{e}"
465
- end
466
- ```
467
-
468
- #### Using the get_users_with_http_info variant
469
-
470
- This returns an Array which contains the response data, status code and headers.
471
-
472
- > <Array(<UsersResponse>, Integer, Hash)> get_users_with_http_info
473
-
474
- ```ruby
475
- begin
476
- # Get users
477
- data, status_code, headers = api_instance.get_users_with_http_info
478
- p status_code # => 2xx
479
- p headers # => { ... }
480
- p data # => <UsersResponse>
481
- rescue UltracartClient::ApiError => e
482
- puts "Error when calling UserApi->get_users_with_http_info: #{e}"
483
- end
484
- ```
485
-
486
- ### Parameters
487
-
488
- This endpoint does not need any parameter.
489
-
490
- ### Return type
491
-
492
- [**UsersResponse**](UsersResponse.md)
493
-
494
- ### Authorization
495
-
496
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
497
-
498
- ### HTTP request headers
499
-
500
- - **Content-Type**: Not defined
501
- - **Accept**: application/json
502
-
503
-
504
- ## insert_group
505
-
506
- > <GroupResponse> insert_group(group)
507
-
508
- Insert a group
509
-
510
- Insert a group on the UltraCart account.
511
-
512
- ### Examples
513
-
514
- ```ruby
515
- require 'time'
516
- require 'ultracart_api'
517
- require 'json'
518
- require 'yaml'
519
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
520
-
521
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
522
- # As such, this might not be the best way to use this object.
523
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
524
-
525
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
526
- group = UltracartClient::Group.new # Group | Group to insert
527
-
528
- begin
529
- # Insert a group
530
- result = api_instance.insert_group(group)
531
- p result
532
- rescue UltracartClient::ApiError => e
533
- puts "Error when calling UserApi->insert_group: #{e}"
534
- end
535
- ```
536
-
537
- #### Using the insert_group_with_http_info variant
538
-
539
- This returns an Array which contains the response data, status code and headers.
540
-
541
- > <Array(<GroupResponse>, Integer, Hash)> insert_group_with_http_info(group)
542
-
543
- ```ruby
544
- begin
545
- # Insert a group
546
- data, status_code, headers = api_instance.insert_group_with_http_info(group)
547
- p status_code # => 2xx
548
- p headers # => { ... }
549
- p data # => <GroupResponse>
550
- rescue UltracartClient::ApiError => e
551
- puts "Error when calling UserApi->insert_group_with_http_info: #{e}"
552
- end
553
- ```
554
-
555
- ### Parameters
556
-
557
- | Name | Type | Description | Notes |
558
- | ---- | ---- | ----------- | ----- |
559
- | **group** | [**Group**](Group.md) | Group to insert | |
560
-
561
- ### Return type
562
-
563
- [**GroupResponse**](GroupResponse.md)
564
-
565
- ### Authorization
566
-
567
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
568
-
569
- ### HTTP request headers
570
-
571
- - **Content-Type**: application/json; charset=UTF-8
572
- - **Accept**: application/json
573
-
574
-
575
- ## insert_user
576
-
577
- > <UserResponse> insert_user(user)
578
-
579
- Insert a user
580
-
581
- Insert a user on the UltraCart account.
582
-
583
- ### Examples
584
-
585
- ```ruby
586
- require 'time'
587
- require 'ultracart_api'
588
- require 'json'
589
- require 'yaml'
590
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
591
-
592
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
593
- # As such, this might not be the best way to use this object.
594
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
595
-
596
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
597
- user = UltracartClient::User.new # User | User to insert
598
-
599
- begin
600
- # Insert a user
601
- result = api_instance.insert_user(user)
602
- p result
603
- rescue UltracartClient::ApiError => e
604
- puts "Error when calling UserApi->insert_user: #{e}"
605
- end
606
- ```
607
-
608
- #### Using the insert_user_with_http_info variant
609
-
610
- This returns an Array which contains the response data, status code and headers.
611
-
612
- > <Array(<UserResponse>, Integer, Hash)> insert_user_with_http_info(user)
613
-
614
- ```ruby
615
- begin
616
- # Insert a user
617
- data, status_code, headers = api_instance.insert_user_with_http_info(user)
618
- p status_code # => 2xx
619
- p headers # => { ... }
620
- p data # => <UserResponse>
621
- rescue UltracartClient::ApiError => e
622
- puts "Error when calling UserApi->insert_user_with_http_info: #{e}"
623
- end
624
- ```
625
-
626
- ### Parameters
627
-
628
- | Name | Type | Description | Notes |
629
- | ---- | ---- | ----------- | ----- |
630
- | **user** | [**User**](User.md) | User to insert | |
631
-
632
- ### Return type
633
-
634
- [**UserResponse**](UserResponse.md)
635
-
636
- ### Authorization
637
-
638
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
639
-
640
- ### HTTP request headers
641
-
642
- - **Content-Type**: application/json; charset=UTF-8
643
- - **Accept**: application/json
644
-
645
-
646
- ## update_group
647
-
648
- > <GroupResponse> update_group(group_oid, group)
649
-
650
- Update a group
651
-
652
- Update a group on the UltraCart account.
653
-
654
- ### Examples
655
-
656
- ```ruby
657
- require 'time'
658
- require 'ultracart_api'
659
- require 'json'
660
- require 'yaml'
661
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
662
-
663
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
664
- # As such, this might not be the best way to use this object.
665
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
666
-
667
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
668
- group_oid = 56 # Integer | The group_oid to update.
669
- group = UltracartClient::Group.new # Group | Group to update
670
-
671
- begin
672
- # Update a group
673
- result = api_instance.update_group(group_oid, group)
674
- p result
675
- rescue UltracartClient::ApiError => e
676
- puts "Error when calling UserApi->update_group: #{e}"
677
- end
678
- ```
679
-
680
- #### Using the update_group_with_http_info variant
681
-
682
- This returns an Array which contains the response data, status code and headers.
683
-
684
- > <Array(<GroupResponse>, Integer, Hash)> update_group_with_http_info(group_oid, group)
685
-
686
- ```ruby
687
- begin
688
- # Update a group
689
- data, status_code, headers = api_instance.update_group_with_http_info(group_oid, group)
690
- p status_code # => 2xx
691
- p headers # => { ... }
692
- p data # => <GroupResponse>
693
- rescue UltracartClient::ApiError => e
694
- puts "Error when calling UserApi->update_group_with_http_info: #{e}"
695
- end
696
- ```
697
-
698
- ### Parameters
699
-
700
- | Name | Type | Description | Notes |
701
- | ---- | ---- | ----------- | ----- |
702
- | **group_oid** | **Integer** | The group_oid to update. | |
703
- | **group** | [**Group**](Group.md) | Group to update | |
704
-
705
- ### Return type
706
-
707
- [**GroupResponse**](GroupResponse.md)
708
-
709
- ### Authorization
710
-
711
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
712
-
713
- ### HTTP request headers
714
-
715
- - **Content-Type**: application/json; charset=UTF-8
716
- - **Accept**: application/json
717
-
718
-
719
- ## update_user
720
-
721
- > <UserResponse> update_user(user_id, user)
722
-
723
- Update a user
724
-
725
- Update a user on the UltraCart account.
726
-
727
- ### Examples
728
-
729
- ```ruby
730
- require 'time'
731
- require 'ultracart_api'
732
- require 'json'
733
- require 'yaml'
734
- require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
735
-
736
- # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
737
- # As such, this might not be the best way to use this object.
738
- # Please see https://github.com/UltraCart/sdk_samples for working examples.
739
-
740
- api = UltracartClient::UserApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
741
- user_id = 56 # Integer | The user_id to update.
742
- user = UltracartClient::User.new # User | User to update
743
-
744
- begin
745
- # Update a user
746
- result = api_instance.update_user(user_id, user)
747
- p result
748
- rescue UltracartClient::ApiError => e
749
- puts "Error when calling UserApi->update_user: #{e}"
750
- end
751
- ```
752
-
753
- #### Using the update_user_with_http_info variant
754
-
755
- This returns an Array which contains the response data, status code and headers.
756
-
757
- > <Array(<UserResponse>, Integer, Hash)> update_user_with_http_info(user_id, user)
758
-
759
- ```ruby
760
- begin
761
- # Update a user
762
- data, status_code, headers = api_instance.update_user_with_http_info(user_id, user)
763
- p status_code # => 2xx
764
- p headers # => { ... }
765
- p data # => <UserResponse>
766
- rescue UltracartClient::ApiError => e
767
- puts "Error when calling UserApi->update_user_with_http_info: #{e}"
768
- end
769
- ```
770
-
771
- ### Parameters
772
-
773
- | Name | Type | Description | Notes |
774
- | ---- | ---- | ----------- | ----- |
775
- | **user_id** | **Integer** | The user_id to update. | |
776
- | **user** | [**User**](User.md) | User to update | |
777
-
778
- ### Return type
779
-
780
- [**UserResponse**](UserResponse.md)
781
-
782
- ### Authorization
783
-
784
- [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
785
-
786
- ### HTTP request headers
787
-
788
- - **Content-Type**: application/json; charset=UTF-8
789
- - **Accept**: application/json
790
-
1
+ # UltracartClient::UserApi
2
+
3
+ All URIs are relative to *https://secure.ultracart.com/rest/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**delete_group**](UserApi.md#delete_group) | **DELETE** /user/groups/{group_oid} | Delete a group |
8
+ | [**delete_user**](UserApi.md#delete_user) | **DELETE** /user/users/{user_id} | Delete a user |
9
+ | [**get_group**](UserApi.md#get_group) | **GET** /user/groups/{group_oid} | Retrieve a group |
10
+ | [**get_groups**](UserApi.md#get_groups) | **GET** /user/groups | Get groups |
11
+ | [**get_user**](UserApi.md#get_user) | **GET** /user/users/{user_id} | Retrieve a user |
12
+ | [**get_user_logins**](UserApi.md#get_user_logins) | **GET** /user/users/{user_id}/logins | Retrieve a user&#39;s login history |
13
+ | [**get_users**](UserApi.md#get_users) | **GET** /user/users | Get users |
14
+ | [**insert_group**](UserApi.md#insert_group) | **POST** /user/groups | Insert a group |
15
+ | [**insert_user**](UserApi.md#insert_user) | **POST** /user/users | Insert a user |
16
+ | [**update_group**](UserApi.md#update_group) | **PUT** /user/groups/{group_oid} | Update a group |
17
+ | [**update_user**](UserApi.md#update_user) | **PUT** /user/users/{user_id} | Update a user |
18
+
19
+
20
+ ## delete_group
21
+
22
+ > delete_group(group_oid)
23
+
24
+ Delete a group
25
+
26
+ Delete a group on the UltraCart account.
27
+
28
+
29
+ ### Examples
30
+
31
+ ```ruby
32
+ # Internal API. No samples are provided as merchants will never need this api method
33
+ ```
34
+
35
+
36
+ #### Using the delete_group_with_http_info variant
37
+
38
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
39
+
40
+ > <Array(nil, Integer, Hash)> delete_group_with_http_info(group_oid)
41
+
42
+ ```ruby
43
+ begin
44
+ # Delete a group
45
+ data, status_code, headers = api_instance.delete_group_with_http_info(group_oid)
46
+ p status_code # => 2xx
47
+ p headers # => { ... }
48
+ p data # => nil
49
+ rescue UltracartClient::ApiError => e
50
+ puts "Error when calling UserApi->delete_group_with_http_info: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ | Name | Type | Description | Notes |
57
+ | ---- | ---- | ----------- | ----- |
58
+ | **group_oid** | **Integer** | The group_oid to delete. | |
59
+
60
+ ### Return type
61
+
62
+ nil (empty response body)
63
+
64
+ ### Authorization
65
+
66
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: Not defined
71
+ - **Accept**: application/json
72
+
73
+
74
+ ## delete_user
75
+
76
+ > delete_user(user_id)
77
+
78
+ Delete a user
79
+
80
+ Delete a user on the UltraCart account.
81
+
82
+
83
+ ### Examples
84
+
85
+ ```ruby
86
+ # Internal API. No samples are provided as merchants will never need this api method
87
+ ```
88
+
89
+
90
+ #### Using the delete_user_with_http_info variant
91
+
92
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
93
+
94
+ > <Array(nil, Integer, Hash)> delete_user_with_http_info(user_id)
95
+
96
+ ```ruby
97
+ begin
98
+ # Delete a user
99
+ data, status_code, headers = api_instance.delete_user_with_http_info(user_id)
100
+ p status_code # => 2xx
101
+ p headers # => { ... }
102
+ p data # => nil
103
+ rescue UltracartClient::ApiError => e
104
+ puts "Error when calling UserApi->delete_user_with_http_info: #{e}"
105
+ end
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ | Name | Type | Description | Notes |
111
+ | ---- | ---- | ----------- | ----- |
112
+ | **user_id** | **Integer** | The user_id to delete. | |
113
+
114
+ ### Return type
115
+
116
+ nil (empty response body)
117
+
118
+ ### Authorization
119
+
120
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
121
+
122
+ ### HTTP request headers
123
+
124
+ - **Content-Type**: Not defined
125
+ - **Accept**: application/json
126
+
127
+
128
+ ## get_group
129
+
130
+ > get_group(group_oid)
131
+
132
+ Retrieve a group
133
+
134
+ Retrieves a single group using the specified group id.
135
+
136
+
137
+ ### Examples
138
+
139
+ ```ruby
140
+ # Internal API. No samples are provided as merchants will never need this api method
141
+ ```
142
+
143
+
144
+ #### Using the get_group_with_http_info variant
145
+
146
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
147
+
148
+ > <Array(nil, Integer, Hash)> get_group_with_http_info(group_oid)
149
+
150
+ ```ruby
151
+ begin
152
+ # Retrieve a group
153
+ data, status_code, headers = api_instance.get_group_with_http_info(group_oid)
154
+ p status_code # => 2xx
155
+ p headers # => { ... }
156
+ p data # => nil
157
+ rescue UltracartClient::ApiError => e
158
+ puts "Error when calling UserApi->get_group_with_http_info: #{e}"
159
+ end
160
+ ```
161
+
162
+ ### Parameters
163
+
164
+ | Name | Type | Description | Notes |
165
+ | ---- | ---- | ----------- | ----- |
166
+ | **group_oid** | **Integer** | The group id to retrieve. | |
167
+
168
+ ### Return type
169
+
170
+ nil (empty response body)
171
+
172
+ ### Authorization
173
+
174
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
175
+
176
+ ### HTTP request headers
177
+
178
+ - **Content-Type**: Not defined
179
+ - **Accept**: application/json
180
+
181
+
182
+ ## get_groups
183
+
184
+ > <GroupsResponse> get_groups
185
+
186
+ Get groups
187
+
188
+
189
+ ### Examples
190
+
191
+ ```ruby
192
+ # Internal API. No samples are provided as merchants will never need this api method
193
+ ```
194
+
195
+
196
+ #### Using the get_groups_with_http_info variant
197
+
198
+ This returns an Array which contains the response data, status code and headers.
199
+
200
+ > <Array(<GroupsResponse>, Integer, Hash)> get_groups_with_http_info
201
+
202
+ ```ruby
203
+ begin
204
+ # Get groups
205
+ data, status_code, headers = api_instance.get_groups_with_http_info
206
+ p status_code # => 2xx
207
+ p headers # => { ... }
208
+ p data # => <GroupsResponse>
209
+ rescue UltracartClient::ApiError => e
210
+ puts "Error when calling UserApi->get_groups_with_http_info: #{e}"
211
+ end
212
+ ```
213
+
214
+ ### Parameters
215
+
216
+ This endpoint does not need any parameter.
217
+
218
+ ### Return type
219
+
220
+ [**GroupsResponse**](GroupsResponse.md)
221
+
222
+ ### Authorization
223
+
224
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
225
+
226
+ ### HTTP request headers
227
+
228
+ - **Content-Type**: Not defined
229
+ - **Accept**: application/json
230
+
231
+
232
+ ## get_user
233
+
234
+ > <UserResponse> get_user(user_id)
235
+
236
+ Retrieve a user
237
+
238
+ Retrieves a single user using the specified user id.
239
+
240
+
241
+ ### Examples
242
+
243
+ ```ruby
244
+ # Internal API. No samples are provided as merchants will never need this api method
245
+ ```
246
+
247
+
248
+ #### Using the get_user_with_http_info variant
249
+
250
+ This returns an Array which contains the response data, status code and headers.
251
+
252
+ > <Array(<UserResponse>, Integer, Hash)> get_user_with_http_info(user_id)
253
+
254
+ ```ruby
255
+ begin
256
+ # Retrieve a user
257
+ data, status_code, headers = api_instance.get_user_with_http_info(user_id)
258
+ p status_code # => 2xx
259
+ p headers # => { ... }
260
+ p data # => <UserResponse>
261
+ rescue UltracartClient::ApiError => e
262
+ puts "Error when calling UserApi->get_user_with_http_info: #{e}"
263
+ end
264
+ ```
265
+
266
+ ### Parameters
267
+
268
+ | Name | Type | Description | Notes |
269
+ | ---- | ---- | ----------- | ----- |
270
+ | **user_id** | **Integer** | The user id to retrieve. | |
271
+
272
+ ### Return type
273
+
274
+ [**UserResponse**](UserResponse.md)
275
+
276
+ ### Authorization
277
+
278
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
279
+
280
+ ### HTTP request headers
281
+
282
+ - **Content-Type**: Not defined
283
+ - **Accept**: application/json
284
+
285
+
286
+ ## get_user_logins
287
+
288
+ > <UserLoginsResponse> get_user_logins(user_id)
289
+
290
+ Retrieve a user's login history
291
+
292
+ Retrieves logins for a single user using the specified user id.
293
+
294
+
295
+ ### Examples
296
+
297
+ ```ruby
298
+ # Internal API. No samples are provided as merchants will never need this api method
299
+ ```
300
+
301
+
302
+ #### Using the get_user_logins_with_http_info variant
303
+
304
+ This returns an Array which contains the response data, status code and headers.
305
+
306
+ > <Array(<UserLoginsResponse>, Integer, Hash)> get_user_logins_with_http_info(user_id)
307
+
308
+ ```ruby
309
+ begin
310
+ # Retrieve a user's login history
311
+ data, status_code, headers = api_instance.get_user_logins_with_http_info(user_id)
312
+ p status_code # => 2xx
313
+ p headers # => { ... }
314
+ p data # => <UserLoginsResponse>
315
+ rescue UltracartClient::ApiError => e
316
+ puts "Error when calling UserApi->get_user_logins_with_http_info: #{e}"
317
+ end
318
+ ```
319
+
320
+ ### Parameters
321
+
322
+ | Name | Type | Description | Notes |
323
+ | ---- | ---- | ----------- | ----- |
324
+ | **user_id** | **Integer** | The user id to retrieve. | |
325
+
326
+ ### Return type
327
+
328
+ [**UserLoginsResponse**](UserLoginsResponse.md)
329
+
330
+ ### Authorization
331
+
332
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
333
+
334
+ ### HTTP request headers
335
+
336
+ - **Content-Type**: Not defined
337
+ - **Accept**: application/json
338
+
339
+
340
+ ## get_users
341
+
342
+ > <UsersResponse> get_users
343
+
344
+ Get users
345
+
346
+
347
+ ### Examples
348
+
349
+ ```ruby
350
+ # Internal API. No samples are provided as merchants will never need this api method
351
+ ```
352
+
353
+
354
+ #### Using the get_users_with_http_info variant
355
+
356
+ This returns an Array which contains the response data, status code and headers.
357
+
358
+ > <Array(<UsersResponse>, Integer, Hash)> get_users_with_http_info
359
+
360
+ ```ruby
361
+ begin
362
+ # Get users
363
+ data, status_code, headers = api_instance.get_users_with_http_info
364
+ p status_code # => 2xx
365
+ p headers # => { ... }
366
+ p data # => <UsersResponse>
367
+ rescue UltracartClient::ApiError => e
368
+ puts "Error when calling UserApi->get_users_with_http_info: #{e}"
369
+ end
370
+ ```
371
+
372
+ ### Parameters
373
+
374
+ This endpoint does not need any parameter.
375
+
376
+ ### Return type
377
+
378
+ [**UsersResponse**](UsersResponse.md)
379
+
380
+ ### Authorization
381
+
382
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
383
+
384
+ ### HTTP request headers
385
+
386
+ - **Content-Type**: Not defined
387
+ - **Accept**: application/json
388
+
389
+
390
+ ## insert_group
391
+
392
+ > <GroupResponse> insert_group(group)
393
+
394
+ Insert a group
395
+
396
+ Insert a group on the UltraCart account.
397
+
398
+
399
+ ### Examples
400
+
401
+ ```ruby
402
+ # Internal API. No samples are provided as merchants will never need this api method
403
+ ```
404
+
405
+
406
+ #### Using the insert_group_with_http_info variant
407
+
408
+ This returns an Array which contains the response data, status code and headers.
409
+
410
+ > <Array(<GroupResponse>, Integer, Hash)> insert_group_with_http_info(group)
411
+
412
+ ```ruby
413
+ begin
414
+ # Insert a group
415
+ data, status_code, headers = api_instance.insert_group_with_http_info(group)
416
+ p status_code # => 2xx
417
+ p headers # => { ... }
418
+ p data # => <GroupResponse>
419
+ rescue UltracartClient::ApiError => e
420
+ puts "Error when calling UserApi->insert_group_with_http_info: #{e}"
421
+ end
422
+ ```
423
+
424
+ ### Parameters
425
+
426
+ | Name | Type | Description | Notes |
427
+ | ---- | ---- | ----------- | ----- |
428
+ | **group** | [**Group**](Group.md) | Group to insert | |
429
+
430
+ ### Return type
431
+
432
+ [**GroupResponse**](GroupResponse.md)
433
+
434
+ ### Authorization
435
+
436
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
437
+
438
+ ### HTTP request headers
439
+
440
+ - **Content-Type**: application/json; charset=UTF-8
441
+ - **Accept**: application/json
442
+
443
+
444
+ ## insert_user
445
+
446
+ > <UserResponse> insert_user(user)
447
+
448
+ Insert a user
449
+
450
+ Insert a user on the UltraCart account.
451
+
452
+
453
+ ### Examples
454
+
455
+ ```ruby
456
+ # Internal API. No samples are provided as merchants will never need this api method
457
+ ```
458
+
459
+
460
+ #### Using the insert_user_with_http_info variant
461
+
462
+ This returns an Array which contains the response data, status code and headers.
463
+
464
+ > <Array(<UserResponse>, Integer, Hash)> insert_user_with_http_info(user)
465
+
466
+ ```ruby
467
+ begin
468
+ # Insert a user
469
+ data, status_code, headers = api_instance.insert_user_with_http_info(user)
470
+ p status_code # => 2xx
471
+ p headers # => { ... }
472
+ p data # => <UserResponse>
473
+ rescue UltracartClient::ApiError => e
474
+ puts "Error when calling UserApi->insert_user_with_http_info: #{e}"
475
+ end
476
+ ```
477
+
478
+ ### Parameters
479
+
480
+ | Name | Type | Description | Notes |
481
+ | ---- | ---- | ----------- | ----- |
482
+ | **user** | [**User**](User.md) | User to insert | |
483
+
484
+ ### Return type
485
+
486
+ [**UserResponse**](UserResponse.md)
487
+
488
+ ### Authorization
489
+
490
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
491
+
492
+ ### HTTP request headers
493
+
494
+ - **Content-Type**: application/json; charset=UTF-8
495
+ - **Accept**: application/json
496
+
497
+
498
+ ## update_group
499
+
500
+ > <GroupResponse> update_group(group_oid, group)
501
+
502
+ Update a group
503
+
504
+ Update a group on the UltraCart account.
505
+
506
+
507
+ ### Examples
508
+
509
+ ```ruby
510
+ # Internal API. No samples are provided as merchants will never need this api method
511
+ ```
512
+
513
+
514
+ #### Using the update_group_with_http_info variant
515
+
516
+ This returns an Array which contains the response data, status code and headers.
517
+
518
+ > <Array(<GroupResponse>, Integer, Hash)> update_group_with_http_info(group_oid, group)
519
+
520
+ ```ruby
521
+ begin
522
+ # Update a group
523
+ data, status_code, headers = api_instance.update_group_with_http_info(group_oid, group)
524
+ p status_code # => 2xx
525
+ p headers # => { ... }
526
+ p data # => <GroupResponse>
527
+ rescue UltracartClient::ApiError => e
528
+ puts "Error when calling UserApi->update_group_with_http_info: #{e}"
529
+ end
530
+ ```
531
+
532
+ ### Parameters
533
+
534
+ | Name | Type | Description | Notes |
535
+ | ---- | ---- | ----------- | ----- |
536
+ | **group_oid** | **Integer** | The group_oid to update. | |
537
+ | **group** | [**Group**](Group.md) | Group to update | |
538
+
539
+ ### Return type
540
+
541
+ [**GroupResponse**](GroupResponse.md)
542
+
543
+ ### Authorization
544
+
545
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
546
+
547
+ ### HTTP request headers
548
+
549
+ - **Content-Type**: application/json; charset=UTF-8
550
+ - **Accept**: application/json
551
+
552
+
553
+ ## update_user
554
+
555
+ > <UserResponse> update_user(user_id, user)
556
+
557
+ Update a user
558
+
559
+ Update a user on the UltraCart account.
560
+
561
+
562
+ ### Examples
563
+
564
+ ```ruby
565
+ # Internal API. No samples are provided as merchants will never need this api method
566
+ ```
567
+
568
+
569
+ #### Using the update_user_with_http_info variant
570
+
571
+ This returns an Array which contains the response data, status code and headers.
572
+
573
+ > <Array(<UserResponse>, Integer, Hash)> update_user_with_http_info(user_id, user)
574
+
575
+ ```ruby
576
+ begin
577
+ # Update a user
578
+ data, status_code, headers = api_instance.update_user_with_http_info(user_id, user)
579
+ p status_code # => 2xx
580
+ p headers # => { ... }
581
+ p data # => <UserResponse>
582
+ rescue UltracartClient::ApiError => e
583
+ puts "Error when calling UserApi->update_user_with_http_info: #{e}"
584
+ end
585
+ ```
586
+
587
+ ### Parameters
588
+
589
+ | Name | Type | Description | Notes |
590
+ | ---- | ---- | ----------- | ----- |
591
+ | **user_id** | **Integer** | The user_id to update. | |
592
+ | **user** | [**User**](User.md) | User to update | |
593
+
594
+ ### Return type
595
+
596
+ [**UserResponse**](UserResponse.md)
597
+
598
+ ### Authorization
599
+
600
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
601
+
602
+ ### HTTP request headers
603
+
604
+ - **Content-Type**: application/json; charset=UTF-8
605
+ - **Accept**: application/json
606
+