smooch-api 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -1
  3. data/docs/AppApi.md +5 -3
  4. data/docs/ListServiceAccountsResponse.md +10 -0
  5. data/docs/ServiceAccount.md +9 -0
  6. data/docs/ServiceAccountApi.md +554 -0
  7. data/docs/ServiceAccountCreate.md +8 -0
  8. data/docs/ServiceAccountResponse.md +8 -0
  9. data/docs/ServiceAccountUpdate.md +8 -0
  10. data/lib/smooch-api.rb +7 -1
  11. data/lib/smooch-api/api/app_api.rb +5 -2
  12. data/lib/smooch-api/api/app_user_api.rb +1 -1
  13. data/lib/smooch-api/api/attachments_api.rb +1 -1
  14. data/lib/smooch-api/api/conversation_api.rb +1 -1
  15. data/lib/smooch-api/api/integration_api.rb +1 -1
  16. data/lib/smooch-api/api/menu_api.rb +1 -1
  17. data/lib/smooch-api/api/service_account_api.rb +601 -0
  18. data/lib/smooch-api/api/webhook_api.rb +1 -1
  19. data/lib/smooch-api/api_client.rb +1 -1
  20. data/lib/smooch-api/api_error.rb +1 -1
  21. data/lib/smooch-api/configuration.rb +1 -1
  22. data/lib/smooch-api/models/action.rb +1 -1
  23. data/lib/smooch-api/models/app.rb +1 -1
  24. data/lib/smooch-api/models/app_create.rb +1 -1
  25. data/lib/smooch-api/models/app_response.rb +1 -1
  26. data/lib/smooch-api/models/app_settings.rb +1 -1
  27. data/lib/smooch-api/models/app_update.rb +1 -1
  28. data/lib/smooch-api/models/app_user.rb +1 -1
  29. data/lib/smooch-api/models/app_user_business_systems_response.rb +1 -1
  30. data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
  31. data/lib/smooch-api/models/app_user_link.rb +1 -1
  32. data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
  33. data/lib/smooch-api/models/app_user_response.rb +1 -1
  34. data/lib/smooch-api/models/app_user_update.rb +1 -1
  35. data/lib/smooch-api/models/attachment_response.rb +1 -1
  36. data/lib/smooch-api/models/auth_code_response.rb +1 -1
  37. data/lib/smooch-api/models/business_system_item.rb +1 -1
  38. data/lib/smooch-api/models/channel_entity_item.rb +1 -1
  39. data/lib/smooch-api/models/client.rb +1 -1
  40. data/lib/smooch-api/models/client_info.rb +1 -1
  41. data/lib/smooch-api/models/confirmation.rb +1 -1
  42. data/lib/smooch-api/models/conversation.rb +1 -1
  43. data/lib/smooch-api/models/destination.rb +1 -1
  44. data/lib/smooch-api/models/display_settings.rb +1 -1
  45. data/lib/smooch-api/models/get_messages_response.rb +1 -1
  46. data/lib/smooch-api/models/integration.rb +1 -1
  47. data/lib/smooch-api/models/integration_create.rb +1 -1
  48. data/lib/smooch-api/models/integration_response.rb +1 -1
  49. data/lib/smooch-api/models/integration_update.rb +1 -1
  50. data/lib/smooch-api/models/jwt_response.rb +1 -1
  51. data/lib/smooch-api/models/link_request_response.rb +1 -1
  52. data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
  53. data/lib/smooch-api/models/list_apps_response.rb +1 -1
  54. data/lib/smooch-api/models/list_integrations_response.rb +1 -1
  55. data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
  56. data/lib/smooch-api/models/list_service_accounts_response.rb +211 -0
  57. data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
  58. data/lib/smooch-api/models/menu.rb +1 -1
  59. data/lib/smooch-api/models/menu_item.rb +1 -1
  60. data/lib/smooch-api/models/menu_response.rb +1 -1
  61. data/lib/smooch-api/models/message.rb +1 -1
  62. data/lib/smooch-api/models/message_item.rb +1 -1
  63. data/lib/smooch-api/models/message_post.rb +1 -1
  64. data/lib/smooch-api/models/message_response.rb +1 -1
  65. data/lib/smooch-api/models/secret_key.rb +1 -1
  66. data/lib/smooch-api/models/secret_key_create.rb +1 -1
  67. data/lib/smooch-api/models/secret_key_response.rb +1 -1
  68. data/lib/smooch-api/models/service_account.rb +209 -0
  69. data/lib/smooch-api/models/service_account_create.rb +194 -0
  70. data/lib/smooch-api/models/service_account_response.rb +189 -0
  71. data/lib/smooch-api/models/service_account_update.rb +194 -0
  72. data/lib/smooch-api/models/source.rb +1 -1
  73. data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
  74. data/lib/smooch-api/models/webhook.rb +1 -1
  75. data/lib/smooch-api/models/webhook_create.rb +1 -1
  76. data/lib/smooch-api/models/webhook_response.rb +1 -1
  77. data/lib/smooch-api/models/webhook_update.rb +1 -1
  78. data/lib/smooch-api/version.rb +2 -2
  79. data/smooch-api.gemspec +1 -1
  80. data/spec/api_client_spec.rb +1 -1
  81. data/spec/configuration_spec.rb +1 -1
  82. data/spec/spec_helper.rb +1 -1
  83. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9dde887ae3ee8bfe19a1d2e44fa384d4f3739d9a
4
- data.tar.gz: 75d345df5a62e79d58c6086049b3a554a88e6816
3
+ metadata.gz: 311548049691ffcd9c9e450673eec6155ddae0e9
4
+ data.tar.gz: 5e5c1177fddef392b7e0090bcfdfd9b31a1e9fc5
5
5
  SHA512:
6
- metadata.gz: 75d7fd08469ed6525d400722514f3bf952796cc7eee31a4d49d593f98176a0e15fd9f22e62846460cea8fcd6c3442fab0de57f715a06b164593d3fe023adca0e
7
- data.tar.gz: 7a7f30212e263f1d9ca1751afd7c2942a289fc53b9cf882933fb50ea922b57ffa99813dc2f37d3d2825fcd685918139d28c9da12a71781447ae3a4f5d531d561
6
+ metadata.gz: 46e201504ac41865dfc8a2a576b700599cc58b125cf43d12f08b184c87f119da7ec035cf0679196e95c40c96468fc154c66936621c9b24f5acc07a72613fe911
7
+ data.tar.gz: 86385ea46ec639b3ec40d9c8bbe61d670ad5880e1855ca22acfdc838797dc5206e68d1ef007036cb4f927fa6699974ae759120fcecc5278a6201f2ed6aad7cef
data/README.md CHANGED
@@ -16,7 +16,7 @@ gem install smooch-api
16
16
 
17
17
  Add this to the Gemfile:
18
18
 
19
- gem 'smooch-api', '~> 2.8.0'
19
+ gem 'smooch-api', '~> 2.9.0'
20
20
 
21
21
  ## Getting Started
22
22
 
@@ -117,6 +117,16 @@ Class | Method | HTTP request | Description
117
117
  *SmoochApi::MenuApi* | [**delete_menu**](docs/MenuApi.md#delete_menu) | **DELETE** /apps/{appId}/menu |
118
118
  *SmoochApi::MenuApi* | [**get_menu**](docs/MenuApi.md#get_menu) | **GET** /apps/{appId}/menu |
119
119
  *SmoochApi::MenuApi* | [**update_menu**](docs/MenuApi.md#update_menu) | **PUT** /apps/{appId}/menu |
120
+ *SmoochApi::ServiceAccountApi* | [**create_secret_key**](docs/ServiceAccountApi.md#create_secret_key) | **POST** /serviceaccounts/{serviceAccountId}/keys |
121
+ *SmoochApi::ServiceAccountApi* | [**create_service_account**](docs/ServiceAccountApi.md#create_service_account) | **POST** /serviceaccounts |
122
+ *SmoochApi::ServiceAccountApi* | [**delete_secret_key**](docs/ServiceAccountApi.md#delete_secret_key) | **DELETE** /serviceaccounts/{serviceAccountId}/keys/{keyId} |
123
+ *SmoochApi::ServiceAccountApi* | [**delete_service_account**](docs/ServiceAccountApi.md#delete_service_account) | **DELETE** /serviceaccounts/{serviceAccountId} |
124
+ *SmoochApi::ServiceAccountApi* | [**get_jwt**](docs/ServiceAccountApi.md#get_jwt) | **GET** /serviceaccounts/{serviceAccountId}/keys/{keyId}/jwt |
125
+ *SmoochApi::ServiceAccountApi* | [**get_secret_key**](docs/ServiceAccountApi.md#get_secret_key) | **GET** /serviceaccounts/{serviceAccountId}/keys/{keyId} |
126
+ *SmoochApi::ServiceAccountApi* | [**get_service_account**](docs/ServiceAccountApi.md#get_service_account) | **GET** /serviceaccounts/{serviceAccountId} |
127
+ *SmoochApi::ServiceAccountApi* | [**list_secret_keys**](docs/ServiceAccountApi.md#list_secret_keys) | **GET** /serviceaccounts/{serviceAccountId}/keys |
128
+ *SmoochApi::ServiceAccountApi* | [**list_service_accounts**](docs/ServiceAccountApi.md#list_service_accounts) | **GET** /serviceaccounts |
129
+ *SmoochApi::ServiceAccountApi* | [**update_service_account**](docs/ServiceAccountApi.md#update_service_account) | **PUT** /serviceaccounts/{serviceAccountId} |
120
130
  *SmoochApi::WebhookApi* | [**create_webhook**](docs/WebhookApi.md#create_webhook) | **POST** /apps/{appId}/webhooks |
121
131
  *SmoochApi::WebhookApi* | [**delete_webhook**](docs/WebhookApi.md#delete_webhook) | **DELETE** /apps/{appId}/webhooks/{webhookId} |
122
132
  *SmoochApi::WebhookApi* | [**get_webhook**](docs/WebhookApi.md#get_webhook) | **GET** /apps/{appId}/webhooks/{webhookId} |
@@ -160,6 +170,7 @@ Class | Method | HTTP request | Description
160
170
  - [SmoochApi::ListAppsResponse](docs/ListAppsResponse.md)
161
171
  - [SmoochApi::ListIntegrationsResponse](docs/ListIntegrationsResponse.md)
162
172
  - [SmoochApi::ListSecretKeysResponse](docs/ListSecretKeysResponse.md)
173
+ - [SmoochApi::ListServiceAccountsResponse](docs/ListServiceAccountsResponse.md)
163
174
  - [SmoochApi::ListWebhooksResponse](docs/ListWebhooksResponse.md)
164
175
  - [SmoochApi::Menu](docs/Menu.md)
165
176
  - [SmoochApi::MenuItem](docs/MenuItem.md)
@@ -171,6 +182,10 @@ Class | Method | HTTP request | Description
171
182
  - [SmoochApi::SecretKey](docs/SecretKey.md)
172
183
  - [SmoochApi::SecretKeyCreate](docs/SecretKeyCreate.md)
173
184
  - [SmoochApi::SecretKeyResponse](docs/SecretKeyResponse.md)
185
+ - [SmoochApi::ServiceAccount](docs/ServiceAccount.md)
186
+ - [SmoochApi::ServiceAccountCreate](docs/ServiceAccountCreate.md)
187
+ - [SmoochApi::ServiceAccountResponse](docs/ServiceAccountResponse.md)
188
+ - [SmoochApi::ServiceAccountUpdate](docs/ServiceAccountUpdate.md)
174
189
  - [SmoochApi::Source](docs/Source.md)
175
190
  - [SmoochApi::TypingActivityTrigger](docs/TypingActivityTrigger.md)
176
191
  - [SmoochApi::Webhook](docs/Webhook.md)
@@ -411,8 +411,9 @@ end
411
411
  api_instance = SmoochApi::AppApi.new
412
412
 
413
413
  opts = {
414
- limit: 0, # Integer | The number of records to return.
415
- offset: 0 # Integer | The number of initial records to skip before picking records to return.
414
+ limit: 25, # Integer | The number of records to return.
415
+ offset: 0, # Integer | The number of initial records to skip before picking records to return.
416
+ service_account_id: "" # String | The service account ID for which to list apps.
416
417
  }
417
418
 
418
419
  begin
@@ -427,8 +428,9 @@ end
427
428
 
428
429
  Name | Type | Description | Notes
429
430
  ------------- | ------------- | ------------- | -------------
430
- **limit** | **Integer**| The number of records to return. | [optional] [default to 0]
431
+ **limit** | **Integer**| The number of records to return. | [optional] [default to 25]
431
432
  **offset** | **Integer**| The number of initial records to skip before picking records to return. | [optional] [default to 0]
433
+ **service_account_id** | **String**| The service account ID for which to list apps. | [optional] [default to ]
432
434
 
433
435
  ### Return type
434
436
 
@@ -0,0 +1,10 @@
1
+ # SmoochApi::ListServiceAccountsResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **service_accounts** | [**Array<ServiceAccount>**](ServiceAccount.md) | The list of service accounts. | [optional]
7
+ **has_more** | **BOOLEAN** | Flag indicating if there are more service accounts that are not present in the response. | [optional]
8
+ **offset** | **Integer** | The number of service account records skipped in the returned list. | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # SmoochApi::ServiceAccount
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_id** | **String** | The service account's ID. |
7
+ **name** | **String** | The service account's name. |
8
+
9
+
@@ -0,0 +1,554 @@
1
+ # SmoochApi::ServiceAccountApi
2
+
3
+ All URIs are relative to *https://api.smooch.io/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_secret_key**](ServiceAccountApi.md#create_secret_key) | **POST** /serviceaccounts/{serviceAccountId}/keys |
8
+ [**create_service_account**](ServiceAccountApi.md#create_service_account) | **POST** /serviceaccounts |
9
+ [**delete_secret_key**](ServiceAccountApi.md#delete_secret_key) | **DELETE** /serviceaccounts/{serviceAccountId}/keys/{keyId} |
10
+ [**delete_service_account**](ServiceAccountApi.md#delete_service_account) | **DELETE** /serviceaccounts/{serviceAccountId} |
11
+ [**get_jwt**](ServiceAccountApi.md#get_jwt) | **GET** /serviceaccounts/{serviceAccountId}/keys/{keyId}/jwt |
12
+ [**get_secret_key**](ServiceAccountApi.md#get_secret_key) | **GET** /serviceaccounts/{serviceAccountId}/keys/{keyId} |
13
+ [**get_service_account**](ServiceAccountApi.md#get_service_account) | **GET** /serviceaccounts/{serviceAccountId} |
14
+ [**list_secret_keys**](ServiceAccountApi.md#list_secret_keys) | **GET** /serviceaccounts/{serviceAccountId}/keys |
15
+ [**list_service_accounts**](ServiceAccountApi.md#list_service_accounts) | **GET** /serviceaccounts |
16
+ [**update_service_account**](ServiceAccountApi.md#update_service_account) | **PUT** /serviceaccounts/{serviceAccountId} |
17
+
18
+
19
+ # **create_secret_key**
20
+ > SecretKeyResponse create_secret_key(service_account_id, secret_key_create_body)
21
+
22
+
23
+
24
+ Create a secret key for the specified service account.
25
+
26
+ ### Example
27
+ ```ruby
28
+ # load the gem
29
+ require 'smooch-api'
30
+ # setup authorization
31
+ SmoochApi.configure do |config|
32
+ # Configure API key authorization: jwt
33
+ config.api_key['Authorization'] = 'YOUR JWT'
34
+ config.api_key_prefix['Authorization'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = SmoochApi::ServiceAccountApi.new
38
+
39
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
40
+
41
+ secret_key_create_body = SmoochApi::SecretKeyCreate.new # SecretKeyCreate | Body for a createSecretKey request.
42
+
43
+
44
+ begin
45
+ result = api_instance.create_secret_key(service_account_id, secret_key_create_body)
46
+ p result
47
+ rescue SmoochApi::ApiError => e
48
+ puts "Exception when calling ServiceAccountApi->create_secret_key: #{e}"
49
+ end
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+ Name | Type | Description | Notes
55
+ ------------- | ------------- | ------------- | -------------
56
+ **service_account_id** | **String**| Identifies the service account. |
57
+ **secret_key_create_body** | [**SecretKeyCreate**](SecretKeyCreate.md)| Body for a createSecretKey request. |
58
+
59
+ ### Return type
60
+
61
+ [**SecretKeyResponse**](SecretKeyResponse.md)
62
+
63
+ ### Authorization
64
+
65
+ [jwt](../README.md#jwt)
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: application/json
70
+ - **Accept**: application/json
71
+
72
+
73
+
74
+ # **create_service_account**
75
+ > ServiceAccountResponse create_service_account(service_account_create_body)
76
+
77
+
78
+
79
+ Create a new service account.
80
+
81
+ ### Example
82
+ ```ruby
83
+ # load the gem
84
+ require 'smooch-api'
85
+ # setup authorization
86
+ SmoochApi.configure do |config|
87
+ # Configure API key authorization: jwt
88
+ config.api_key['Authorization'] = 'YOUR JWT'
89
+ config.api_key_prefix['Authorization'] = 'Bearer'
90
+ end
91
+
92
+ api_instance = SmoochApi::ServiceAccountApi.new
93
+
94
+ service_account_create_body = SmoochApi::ServiceAccountCreate.new # ServiceAccountCreate | Body for a createServiceAccount request.
95
+
96
+
97
+ begin
98
+ result = api_instance.create_service_account(service_account_create_body)
99
+ p result
100
+ rescue SmoochApi::ApiError => e
101
+ puts "Exception when calling ServiceAccountApi->create_service_account: #{e}"
102
+ end
103
+ ```
104
+
105
+ ### Parameters
106
+
107
+ Name | Type | Description | Notes
108
+ ------------- | ------------- | ------------- | -------------
109
+ **service_account_create_body** | [**ServiceAccountCreate**](ServiceAccountCreate.md)| Body for a createServiceAccount request. |
110
+
111
+ ### Return type
112
+
113
+ [**ServiceAccountResponse**](ServiceAccountResponse.md)
114
+
115
+ ### Authorization
116
+
117
+ [jwt](../README.md#jwt)
118
+
119
+ ### HTTP request headers
120
+
121
+ - **Content-Type**: application/json
122
+ - **Accept**: application/json
123
+
124
+
125
+
126
+ # **delete_secret_key**
127
+ > delete_secret_key(service_account_id, key_id)
128
+
129
+
130
+
131
+ Delete the specified service account secret key.
132
+
133
+ ### Example
134
+ ```ruby
135
+ # load the gem
136
+ require 'smooch-api'
137
+ # setup authorization
138
+ SmoochApi.configure do |config|
139
+ # Configure API key authorization: jwt
140
+ config.api_key['Authorization'] = 'YOUR JWT'
141
+ config.api_key_prefix['Authorization'] = 'Bearer'
142
+ end
143
+
144
+ api_instance = SmoochApi::ServiceAccountApi.new
145
+
146
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
147
+
148
+ key_id = "key_id_example" # String | Identifies the secret key.
149
+
150
+
151
+ begin
152
+ api_instance.delete_secret_key(service_account_id, key_id)
153
+ rescue SmoochApi::ApiError => e
154
+ puts "Exception when calling ServiceAccountApi->delete_secret_key: #{e}"
155
+ end
156
+ ```
157
+
158
+ ### Parameters
159
+
160
+ Name | Type | Description | Notes
161
+ ------------- | ------------- | ------------- | -------------
162
+ **service_account_id** | **String**| Identifies the service account. |
163
+ **key_id** | **String**| Identifies the secret key. |
164
+
165
+ ### Return type
166
+
167
+ nil (empty response body)
168
+
169
+ ### Authorization
170
+
171
+ [jwt](../README.md#jwt)
172
+
173
+ ### HTTP request headers
174
+
175
+ - **Content-Type**: application/json
176
+ - **Accept**: application/json
177
+
178
+
179
+
180
+ # **delete_service_account**
181
+ > delete_service_account(service_account_id, )
182
+
183
+
184
+
185
+ Delete the specified service account.
186
+
187
+ ### Example
188
+ ```ruby
189
+ # load the gem
190
+ require 'smooch-api'
191
+ # setup authorization
192
+ SmoochApi.configure do |config|
193
+ # Configure API key authorization: jwt
194
+ config.api_key['Authorization'] = 'YOUR JWT'
195
+ config.api_key_prefix['Authorization'] = 'Bearer'
196
+ end
197
+
198
+ api_instance = SmoochApi::ServiceAccountApi.new
199
+
200
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
201
+
202
+
203
+ begin
204
+ api_instance.delete_service_account(service_account_id, )
205
+ rescue SmoochApi::ApiError => e
206
+ puts "Exception when calling ServiceAccountApi->delete_service_account: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+ Name | Type | Description | Notes
213
+ ------------- | ------------- | ------------- | -------------
214
+ **service_account_id** | **String**| Identifies the service account. |
215
+
216
+ ### Return type
217
+
218
+ nil (empty response body)
219
+
220
+ ### Authorization
221
+
222
+ [jwt](../README.md#jwt)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: application/json
227
+ - **Accept**: application/json
228
+
229
+
230
+
231
+ # **get_jwt**
232
+ > JwtResponse get_jwt(service_account_id, key_id)
233
+
234
+
235
+
236
+ Get an account-scoped JWT for the specified service account secret key.
237
+
238
+ ### Example
239
+ ```ruby
240
+ # load the gem
241
+ require 'smooch-api'
242
+ # setup authorization
243
+ SmoochApi.configure do |config|
244
+ # Configure API key authorization: jwt
245
+ config.api_key['Authorization'] = 'YOUR JWT'
246
+ config.api_key_prefix['Authorization'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = SmoochApi::ServiceAccountApi.new
250
+
251
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
252
+
253
+ key_id = "key_id_example" # String | Identifies the secret key.
254
+
255
+
256
+ begin
257
+ result = api_instance.get_jwt(service_account_id, key_id)
258
+ p result
259
+ rescue SmoochApi::ApiError => e
260
+ puts "Exception when calling ServiceAccountApi->get_jwt: #{e}"
261
+ end
262
+ ```
263
+
264
+ ### Parameters
265
+
266
+ Name | Type | Description | Notes
267
+ ------------- | ------------- | ------------- | -------------
268
+ **service_account_id** | **String**| Identifies the service account. |
269
+ **key_id** | **String**| Identifies the secret key. |
270
+
271
+ ### Return type
272
+
273
+ [**JwtResponse**](JwtResponse.md)
274
+
275
+ ### Authorization
276
+
277
+ [jwt](../README.md#jwt)
278
+
279
+ ### HTTP request headers
280
+
281
+ - **Content-Type**: application/json
282
+ - **Accept**: application/json
283
+
284
+
285
+
286
+ # **get_secret_key**
287
+ > SecretKeyResponse get_secret_key(service_account_id, key_id)
288
+
289
+
290
+
291
+ Get the specified service account secret key.
292
+
293
+ ### Example
294
+ ```ruby
295
+ # load the gem
296
+ require 'smooch-api'
297
+ # setup authorization
298
+ SmoochApi.configure do |config|
299
+ # Configure API key authorization: jwt
300
+ config.api_key['Authorization'] = 'YOUR JWT'
301
+ config.api_key_prefix['Authorization'] = 'Bearer'
302
+ end
303
+
304
+ api_instance = SmoochApi::ServiceAccountApi.new
305
+
306
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
307
+
308
+ key_id = "key_id_example" # String | Identifies the secret key.
309
+
310
+
311
+ begin
312
+ result = api_instance.get_secret_key(service_account_id, key_id)
313
+ p result
314
+ rescue SmoochApi::ApiError => e
315
+ puts "Exception when calling ServiceAccountApi->get_secret_key: #{e}"
316
+ end
317
+ ```
318
+
319
+ ### Parameters
320
+
321
+ Name | Type | Description | Notes
322
+ ------------- | ------------- | ------------- | -------------
323
+ **service_account_id** | **String**| Identifies the service account. |
324
+ **key_id** | **String**| Identifies the secret key. |
325
+
326
+ ### Return type
327
+
328
+ [**SecretKeyResponse**](SecretKeyResponse.md)
329
+
330
+ ### Authorization
331
+
332
+ [jwt](../README.md#jwt)
333
+
334
+ ### HTTP request headers
335
+
336
+ - **Content-Type**: application/json
337
+ - **Accept**: application/json
338
+
339
+
340
+
341
+ # **get_service_account**
342
+ > ServiceAccountResponse get_service_account(service_account_id, )
343
+
344
+
345
+
346
+ Get the specified service account.
347
+
348
+ ### Example
349
+ ```ruby
350
+ # load the gem
351
+ require 'smooch-api'
352
+ # setup authorization
353
+ SmoochApi.configure do |config|
354
+ # Configure API key authorization: jwt
355
+ config.api_key['Authorization'] = 'YOUR JWT'
356
+ config.api_key_prefix['Authorization'] = 'Bearer'
357
+ end
358
+
359
+ api_instance = SmoochApi::ServiceAccountApi.new
360
+
361
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
362
+
363
+
364
+ begin
365
+ result = api_instance.get_service_account(service_account_id, )
366
+ p result
367
+ rescue SmoochApi::ApiError => e
368
+ puts "Exception when calling ServiceAccountApi->get_service_account: #{e}"
369
+ end
370
+ ```
371
+
372
+ ### Parameters
373
+
374
+ Name | Type | Description | Notes
375
+ ------------- | ------------- | ------------- | -------------
376
+ **service_account_id** | **String**| Identifies the service account. |
377
+
378
+ ### Return type
379
+
380
+ [**ServiceAccountResponse**](ServiceAccountResponse.md)
381
+
382
+ ### Authorization
383
+
384
+ [jwt](../README.md#jwt)
385
+
386
+ ### HTTP request headers
387
+
388
+ - **Content-Type**: application/json
389
+ - **Accept**: application/json
390
+
391
+
392
+
393
+ # **list_secret_keys**
394
+ > ListSecretKeysResponse list_secret_keys(service_account_id, )
395
+
396
+
397
+
398
+ List the secret keys for the specified service account.
399
+
400
+ ### Example
401
+ ```ruby
402
+ # load the gem
403
+ require 'smooch-api'
404
+ # setup authorization
405
+ SmoochApi.configure do |config|
406
+ # Configure API key authorization: jwt
407
+ config.api_key['Authorization'] = 'YOUR JWT'
408
+ config.api_key_prefix['Authorization'] = 'Bearer'
409
+ end
410
+
411
+ api_instance = SmoochApi::ServiceAccountApi.new
412
+
413
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
414
+
415
+
416
+ begin
417
+ result = api_instance.list_secret_keys(service_account_id, )
418
+ p result
419
+ rescue SmoochApi::ApiError => e
420
+ puts "Exception when calling ServiceAccountApi->list_secret_keys: #{e}"
421
+ end
422
+ ```
423
+
424
+ ### Parameters
425
+
426
+ Name | Type | Description | Notes
427
+ ------------- | ------------- | ------------- | -------------
428
+ **service_account_id** | **String**| Identifies the service account. |
429
+
430
+ ### Return type
431
+
432
+ [**ListSecretKeysResponse**](ListSecretKeysResponse.md)
433
+
434
+ ### Authorization
435
+
436
+ [jwt](../README.md#jwt)
437
+
438
+ ### HTTP request headers
439
+
440
+ - **Content-Type**: application/json
441
+ - **Accept**: application/json
442
+
443
+
444
+
445
+ # **list_service_accounts**
446
+ > ListServiceAccountsResponse list_service_accounts(opts)
447
+
448
+
449
+
450
+ List all service accounts configured.
451
+
452
+ ### Example
453
+ ```ruby
454
+ # load the gem
455
+ require 'smooch-api'
456
+ # setup authorization
457
+ SmoochApi.configure do |config|
458
+ # Configure API key authorization: jwt
459
+ config.api_key['Authorization'] = 'YOUR JWT'
460
+ config.api_key_prefix['Authorization'] = 'Bearer'
461
+ end
462
+
463
+ api_instance = SmoochApi::ServiceAccountApi.new
464
+
465
+ opts = {
466
+ limit: 25, # Integer | The number of records to return.
467
+ offset: 0 # Integer | The number of initial records to skip before picking records to return.
468
+ }
469
+
470
+ begin
471
+ result = api_instance.list_service_accounts(opts)
472
+ p result
473
+ rescue SmoochApi::ApiError => e
474
+ puts "Exception when calling ServiceAccountApi->list_service_accounts: #{e}"
475
+ end
476
+ ```
477
+
478
+ ### Parameters
479
+
480
+ Name | Type | Description | Notes
481
+ ------------- | ------------- | ------------- | -------------
482
+ **limit** | **Integer**| The number of records to return. | [optional] [default to 25]
483
+ **offset** | **Integer**| The number of initial records to skip before picking records to return. | [optional] [default to 0]
484
+
485
+ ### Return type
486
+
487
+ [**ListServiceAccountsResponse**](ListServiceAccountsResponse.md)
488
+
489
+ ### Authorization
490
+
491
+ [jwt](../README.md#jwt)
492
+
493
+ ### HTTP request headers
494
+
495
+ - **Content-Type**: application/json
496
+ - **Accept**: application/json
497
+
498
+
499
+
500
+ # **update_service_account**
501
+ > ServiceAccountResponse update_service_account(service_account_id, service_account_update_body)
502
+
503
+
504
+
505
+ Update the specified service account.
506
+
507
+ ### Example
508
+ ```ruby
509
+ # load the gem
510
+ require 'smooch-api'
511
+ # setup authorization
512
+ SmoochApi.configure do |config|
513
+ # Configure API key authorization: jwt
514
+ config.api_key['Authorization'] = 'YOUR JWT'
515
+ config.api_key_prefix['Authorization'] = 'Bearer'
516
+ end
517
+
518
+ api_instance = SmoochApi::ServiceAccountApi.new
519
+
520
+ service_account_id = "service_account_id_example" # String | Identifies the service account.
521
+
522
+ service_account_update_body = SmoochApi::ServiceAccountUpdate.new # ServiceAccountUpdate | Body for an updateServiceAccount request.
523
+
524
+
525
+ begin
526
+ result = api_instance.update_service_account(service_account_id, service_account_update_body)
527
+ p result
528
+ rescue SmoochApi::ApiError => e
529
+ puts "Exception when calling ServiceAccountApi->update_service_account: #{e}"
530
+ end
531
+ ```
532
+
533
+ ### Parameters
534
+
535
+ Name | Type | Description | Notes
536
+ ------------- | ------------- | ------------- | -------------
537
+ **service_account_id** | **String**| Identifies the service account. |
538
+ **service_account_update_body** | [**ServiceAccountUpdate**](ServiceAccountUpdate.md)| Body for an updateServiceAccount request. |
539
+
540
+ ### Return type
541
+
542
+ [**ServiceAccountResponse**](ServiceAccountResponse.md)
543
+
544
+ ### Authorization
545
+
546
+ [jwt](../README.md#jwt)
547
+
548
+ ### HTTP request headers
549
+
550
+ - **Content-Type**: application/json
551
+ - **Accept**: application/json
552
+
553
+
554
+