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.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/docs/AppApi.md +5 -3
- data/docs/ListServiceAccountsResponse.md +10 -0
- data/docs/ServiceAccount.md +9 -0
- data/docs/ServiceAccountApi.md +554 -0
- data/docs/ServiceAccountCreate.md +8 -0
- data/docs/ServiceAccountResponse.md +8 -0
- data/docs/ServiceAccountUpdate.md +8 -0
- data/lib/smooch-api.rb +7 -1
- data/lib/smooch-api/api/app_api.rb +5 -2
- data/lib/smooch-api/api/app_user_api.rb +1 -1
- data/lib/smooch-api/api/attachments_api.rb +1 -1
- data/lib/smooch-api/api/conversation_api.rb +1 -1
- data/lib/smooch-api/api/integration_api.rb +1 -1
- data/lib/smooch-api/api/menu_api.rb +1 -1
- data/lib/smooch-api/api/service_account_api.rb +601 -0
- data/lib/smooch-api/api/webhook_api.rb +1 -1
- data/lib/smooch-api/api_client.rb +1 -1
- data/lib/smooch-api/api_error.rb +1 -1
- data/lib/smooch-api/configuration.rb +1 -1
- data/lib/smooch-api/models/action.rb +1 -1
- data/lib/smooch-api/models/app.rb +1 -1
- data/lib/smooch-api/models/app_create.rb +1 -1
- data/lib/smooch-api/models/app_response.rb +1 -1
- data/lib/smooch-api/models/app_settings.rb +1 -1
- data/lib/smooch-api/models/app_update.rb +1 -1
- data/lib/smooch-api/models/app_user.rb +1 -1
- data/lib/smooch-api/models/app_user_business_systems_response.rb +1 -1
- data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +1 -1
- data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
- data/lib/smooch-api/models/app_user_response.rb +1 -1
- data/lib/smooch-api/models/app_user_update.rb +1 -1
- data/lib/smooch-api/models/attachment_response.rb +1 -1
- data/lib/smooch-api/models/auth_code_response.rb +1 -1
- data/lib/smooch-api/models/business_system_item.rb +1 -1
- data/lib/smooch-api/models/channel_entity_item.rb +1 -1
- data/lib/smooch-api/models/client.rb +1 -1
- data/lib/smooch-api/models/client_info.rb +1 -1
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/conversation.rb +1 -1
- data/lib/smooch-api/models/destination.rb +1 -1
- data/lib/smooch-api/models/display_settings.rb +1 -1
- data/lib/smooch-api/models/get_messages_response.rb +1 -1
- data/lib/smooch-api/models/integration.rb +1 -1
- data/lib/smooch-api/models/integration_create.rb +1 -1
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/integration_update.rb +1 -1
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
- data/lib/smooch-api/models/list_apps_response.rb +1 -1
- data/lib/smooch-api/models/list_integrations_response.rb +1 -1
- data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
- data/lib/smooch-api/models/list_service_accounts_response.rb +211 -0
- data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
- data/lib/smooch-api/models/menu.rb +1 -1
- data/lib/smooch-api/models/menu_item.rb +1 -1
- data/lib/smooch-api/models/menu_response.rb +1 -1
- data/lib/smooch-api/models/message.rb +1 -1
- data/lib/smooch-api/models/message_item.rb +1 -1
- data/lib/smooch-api/models/message_post.rb +1 -1
- data/lib/smooch-api/models/message_response.rb +1 -1
- data/lib/smooch-api/models/secret_key.rb +1 -1
- data/lib/smooch-api/models/secret_key_create.rb +1 -1
- data/lib/smooch-api/models/secret_key_response.rb +1 -1
- data/lib/smooch-api/models/service_account.rb +209 -0
- data/lib/smooch-api/models/service_account_create.rb +194 -0
- data/lib/smooch-api/models/service_account_response.rb +189 -0
- data/lib/smooch-api/models/service_account_update.rb +194 -0
- data/lib/smooch-api/models/source.rb +1 -1
- data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
- data/lib/smooch-api/models/webhook.rb +1 -1
- data/lib/smooch-api/models/webhook_create.rb +1 -1
- data/lib/smooch-api/models/webhook_response.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -1
- data/lib/smooch-api/version.rb +2 -2
- data/smooch-api.gemspec +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +14 -2
data/lib/smooch-api.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -51,6 +51,7 @@ require 'smooch-api/models/link_request_response_link_requests'
|
|
51
51
|
require 'smooch-api/models/list_apps_response'
|
52
52
|
require 'smooch-api/models/list_integrations_response'
|
53
53
|
require 'smooch-api/models/list_secret_keys_response'
|
54
|
+
require 'smooch-api/models/list_service_accounts_response'
|
54
55
|
require 'smooch-api/models/list_webhooks_response'
|
55
56
|
require 'smooch-api/models/menu'
|
56
57
|
require 'smooch-api/models/menu_item'
|
@@ -62,6 +63,10 @@ require 'smooch-api/models/message_response'
|
|
62
63
|
require 'smooch-api/models/secret_key'
|
63
64
|
require 'smooch-api/models/secret_key_create'
|
64
65
|
require 'smooch-api/models/secret_key_response'
|
66
|
+
require 'smooch-api/models/service_account'
|
67
|
+
require 'smooch-api/models/service_account_create'
|
68
|
+
require 'smooch-api/models/service_account_response'
|
69
|
+
require 'smooch-api/models/service_account_update'
|
65
70
|
require 'smooch-api/models/source'
|
66
71
|
require 'smooch-api/models/typing_activity_trigger'
|
67
72
|
require 'smooch-api/models/webhook'
|
@@ -76,6 +81,7 @@ require 'smooch-api/api/attachments_api'
|
|
76
81
|
require 'smooch-api/api/conversation_api'
|
77
82
|
require 'smooch-api/api/integration_api'
|
78
83
|
require 'smooch-api/api/menu_api'
|
84
|
+
require 'smooch-api/api/service_account_api'
|
79
85
|
require 'smooch-api/api/webhook_api'
|
80
86
|
|
81
87
|
module SmoochApi
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -430,8 +430,9 @@ module SmoochApi
|
|
430
430
|
#
|
431
431
|
# List all apps configured.
|
432
432
|
# @param [Hash] opts the optional parameters
|
433
|
-
# @option opts [Integer] :limit The number of records to return. (default to
|
433
|
+
# @option opts [Integer] :limit The number of records to return. (default to 25)
|
434
434
|
# @option opts [Integer] :offset The number of initial records to skip before picking records to return. (default to 0)
|
435
|
+
# @option opts [String] :service_account_id The service account ID for which to list apps. (default to )
|
435
436
|
# @return [ListAppsResponse]
|
436
437
|
def list_apps(opts = {})
|
437
438
|
data, _status_code, _headers = list_apps_with_http_info(opts)
|
@@ -443,6 +444,7 @@ module SmoochApi
|
|
443
444
|
# @param [Hash] opts the optional parameters
|
444
445
|
# @option opts [Integer] :limit The number of records to return.
|
445
446
|
# @option opts [Integer] :offset The number of initial records to skip before picking records to return.
|
447
|
+
# @option opts [String] :service_account_id The service account ID for which to list apps.
|
446
448
|
# @return [Array<(ListAppsResponse, Fixnum, Hash)>] ListAppsResponse data, response status code and response headers
|
447
449
|
def list_apps_with_http_info(opts = {})
|
448
450
|
if @api_client.config.debugging
|
@@ -455,6 +457,7 @@ module SmoochApi
|
|
455
457
|
query_params = {}
|
456
458
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
457
459
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
460
|
+
query_params[:'serviceAccountId'] = opts[:'service_account_id'] if !opts[:'service_account_id'].nil?
|
458
461
|
|
459
462
|
# header parameters
|
460
463
|
header_params = {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.9
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -0,0 +1,601 @@
|
|
1
|
+
=begin
|
2
|
+
#Smooch
|
3
|
+
|
4
|
+
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.9
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module SmoochApi
|
16
|
+
class ServiceAccountApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Create a secret key for the specified service account.
|
25
|
+
# @param service_account_id Identifies the service account.
|
26
|
+
# @param secret_key_create_body Body for a createSecretKey request.
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [SecretKeyResponse]
|
29
|
+
def create_secret_key(service_account_id, secret_key_create_body, opts = {})
|
30
|
+
data, _status_code, _headers = create_secret_key_with_http_info(service_account_id, secret_key_create_body, opts)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# Create a secret key for the specified service account.
|
36
|
+
# @param service_account_id Identifies the service account.
|
37
|
+
# @param secret_key_create_body Body for a createSecretKey request.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(SecretKeyResponse, Fixnum, Hash)>] SecretKeyResponse data, response status code and response headers
|
40
|
+
def create_secret_key_with_http_info(service_account_id, secret_key_create_body, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.create_secret_key ..."
|
43
|
+
end
|
44
|
+
# verify the required parameter 'service_account_id' is set
|
45
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.create_secret_key"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'secret_key_create_body' is set
|
49
|
+
if @api_client.config.client_side_validation && secret_key_create_body.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'secret_key_create_body' when calling ServiceAccountApi.create_secret_key"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}/keys".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s)
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = @api_client.object_to_http_body(secret_key_create_body)
|
70
|
+
auth_names = ['jwt']
|
71
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => 'SecretKeyResponse')
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#create_secret_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
#
|
85
|
+
# Create a new service account.
|
86
|
+
# @param service_account_create_body Body for a createServiceAccount request.
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [ServiceAccountResponse]
|
89
|
+
def create_service_account(service_account_create_body, opts = {})
|
90
|
+
data, _status_code, _headers = create_service_account_with_http_info(service_account_create_body, opts)
|
91
|
+
return data
|
92
|
+
end
|
93
|
+
|
94
|
+
#
|
95
|
+
# Create a new service account.
|
96
|
+
# @param service_account_create_body Body for a createServiceAccount request.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(ServiceAccountResponse, Fixnum, Hash)>] ServiceAccountResponse data, response status code and response headers
|
99
|
+
def create_service_account_with_http_info(service_account_create_body, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.create_service_account ..."
|
102
|
+
end
|
103
|
+
# verify the required parameter 'service_account_create_body' is set
|
104
|
+
if @api_client.config.client_side_validation && service_account_create_body.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'service_account_create_body' when calling ServiceAccountApi.create_service_account"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = "/serviceaccounts"
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
# HTTP header 'Content-Type'
|
118
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = @api_client.object_to_http_body(service_account_create_body)
|
125
|
+
auth_names = ['jwt']
|
126
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
127
|
+
:header_params => header_params,
|
128
|
+
:query_params => query_params,
|
129
|
+
:form_params => form_params,
|
130
|
+
:body => post_body,
|
131
|
+
:auth_names => auth_names,
|
132
|
+
:return_type => 'ServiceAccountResponse')
|
133
|
+
if @api_client.config.debugging
|
134
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#create_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
|
+
end
|
136
|
+
return data, status_code, headers
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Delete the specified service account secret key.
|
141
|
+
# @param service_account_id Identifies the service account.
|
142
|
+
# @param key_id Identifies the secret key.
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [nil]
|
145
|
+
def delete_secret_key(service_account_id, key_id, opts = {})
|
146
|
+
delete_secret_key_with_http_info(service_account_id, key_id, opts)
|
147
|
+
return nil
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Delete the specified service account secret key.
|
152
|
+
# @param service_account_id Identifies the service account.
|
153
|
+
# @param key_id Identifies the secret key.
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
156
|
+
def delete_secret_key_with_http_info(service_account_id, key_id, opts = {})
|
157
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.delete_secret_key ..."
|
159
|
+
end
|
160
|
+
# verify the required parameter 'service_account_id' is set
|
161
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
162
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.delete_secret_key"
|
163
|
+
end
|
164
|
+
# verify the required parameter 'key_id' is set
|
165
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
166
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling ServiceAccountApi.delete_secret_key"
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}/keys/{keyId}".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = {}
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
# HTTP header 'Content-Type'
|
179
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
180
|
+
|
181
|
+
# form parameters
|
182
|
+
form_params = {}
|
183
|
+
|
184
|
+
# http body (model)
|
185
|
+
post_body = nil
|
186
|
+
auth_names = ['jwt']
|
187
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
188
|
+
:header_params => header_params,
|
189
|
+
:query_params => query_params,
|
190
|
+
:form_params => form_params,
|
191
|
+
:body => post_body,
|
192
|
+
:auth_names => auth_names)
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#delete_secret_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
195
|
+
end
|
196
|
+
return data, status_code, headers
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
# Delete the specified service account.
|
201
|
+
# @param service_account_id Identifies the service account.
|
202
|
+
# @param [Hash] opts the optional parameters
|
203
|
+
# @return [nil]
|
204
|
+
def delete_service_account(service_account_id, opts = {})
|
205
|
+
delete_service_account_with_http_info(service_account_id, opts)
|
206
|
+
return nil
|
207
|
+
end
|
208
|
+
|
209
|
+
#
|
210
|
+
# Delete the specified service account.
|
211
|
+
# @param service_account_id Identifies the service account.
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
214
|
+
def delete_service_account_with_http_info(service_account_id, opts = {})
|
215
|
+
if @api_client.config.debugging
|
216
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.delete_service_account ..."
|
217
|
+
end
|
218
|
+
# verify the required parameter 'service_account_id' is set
|
219
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
220
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.delete_service_account"
|
221
|
+
end
|
222
|
+
# resource path
|
223
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s)
|
224
|
+
|
225
|
+
# query parameters
|
226
|
+
query_params = {}
|
227
|
+
|
228
|
+
# header parameters
|
229
|
+
header_params = {}
|
230
|
+
# HTTP header 'Accept' (if needed)
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
# HTTP header 'Content-Type'
|
233
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
234
|
+
|
235
|
+
# form parameters
|
236
|
+
form_params = {}
|
237
|
+
|
238
|
+
# http body (model)
|
239
|
+
post_body = nil
|
240
|
+
auth_names = ['jwt']
|
241
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
242
|
+
:header_params => header_params,
|
243
|
+
:query_params => query_params,
|
244
|
+
:form_params => form_params,
|
245
|
+
:body => post_body,
|
246
|
+
:auth_names => auth_names)
|
247
|
+
if @api_client.config.debugging
|
248
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#delete_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
249
|
+
end
|
250
|
+
return data, status_code, headers
|
251
|
+
end
|
252
|
+
|
253
|
+
#
|
254
|
+
# Get an account-scoped JWT for the specified service account secret key.
|
255
|
+
# @param service_account_id Identifies the service account.
|
256
|
+
# @param key_id Identifies the secret key.
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [JwtResponse]
|
259
|
+
def get_jwt(service_account_id, key_id, opts = {})
|
260
|
+
data, _status_code, _headers = get_jwt_with_http_info(service_account_id, key_id, opts)
|
261
|
+
return data
|
262
|
+
end
|
263
|
+
|
264
|
+
#
|
265
|
+
# Get an account-scoped JWT for the specified service account secret key.
|
266
|
+
# @param service_account_id Identifies the service account.
|
267
|
+
# @param key_id Identifies the secret key.
|
268
|
+
# @param [Hash] opts the optional parameters
|
269
|
+
# @return [Array<(JwtResponse, Fixnum, Hash)>] JwtResponse data, response status code and response headers
|
270
|
+
def get_jwt_with_http_info(service_account_id, key_id, opts = {})
|
271
|
+
if @api_client.config.debugging
|
272
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.get_jwt ..."
|
273
|
+
end
|
274
|
+
# verify the required parameter 'service_account_id' is set
|
275
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
276
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.get_jwt"
|
277
|
+
end
|
278
|
+
# verify the required parameter 'key_id' is set
|
279
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
280
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling ServiceAccountApi.get_jwt"
|
281
|
+
end
|
282
|
+
# resource path
|
283
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}/keys/{keyId}/jwt".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
284
|
+
|
285
|
+
# query parameters
|
286
|
+
query_params = {}
|
287
|
+
|
288
|
+
# header parameters
|
289
|
+
header_params = {}
|
290
|
+
# HTTP header 'Accept' (if needed)
|
291
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
292
|
+
# HTTP header 'Content-Type'
|
293
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
294
|
+
|
295
|
+
# form parameters
|
296
|
+
form_params = {}
|
297
|
+
|
298
|
+
# http body (model)
|
299
|
+
post_body = nil
|
300
|
+
auth_names = ['jwt']
|
301
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
302
|
+
:header_params => header_params,
|
303
|
+
:query_params => query_params,
|
304
|
+
:form_params => form_params,
|
305
|
+
:body => post_body,
|
306
|
+
:auth_names => auth_names,
|
307
|
+
:return_type => 'JwtResponse')
|
308
|
+
if @api_client.config.debugging
|
309
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#get_jwt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
310
|
+
end
|
311
|
+
return data, status_code, headers
|
312
|
+
end
|
313
|
+
|
314
|
+
#
|
315
|
+
# Get the specified service account secret key.
|
316
|
+
# @param service_account_id Identifies the service account.
|
317
|
+
# @param key_id Identifies the secret key.
|
318
|
+
# @param [Hash] opts the optional parameters
|
319
|
+
# @return [SecretKeyResponse]
|
320
|
+
def get_secret_key(service_account_id, key_id, opts = {})
|
321
|
+
data, _status_code, _headers = get_secret_key_with_http_info(service_account_id, key_id, opts)
|
322
|
+
return data
|
323
|
+
end
|
324
|
+
|
325
|
+
#
|
326
|
+
# Get the specified service account secret key.
|
327
|
+
# @param service_account_id Identifies the service account.
|
328
|
+
# @param key_id Identifies the secret key.
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @return [Array<(SecretKeyResponse, Fixnum, Hash)>] SecretKeyResponse data, response status code and response headers
|
331
|
+
def get_secret_key_with_http_info(service_account_id, key_id, opts = {})
|
332
|
+
if @api_client.config.debugging
|
333
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.get_secret_key ..."
|
334
|
+
end
|
335
|
+
# verify the required parameter 'service_account_id' is set
|
336
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
337
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.get_secret_key"
|
338
|
+
end
|
339
|
+
# verify the required parameter 'key_id' is set
|
340
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
341
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling ServiceAccountApi.get_secret_key"
|
342
|
+
end
|
343
|
+
# resource path
|
344
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}/keys/{keyId}".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
|
345
|
+
|
346
|
+
# query parameters
|
347
|
+
query_params = {}
|
348
|
+
|
349
|
+
# header parameters
|
350
|
+
header_params = {}
|
351
|
+
# HTTP header 'Accept' (if needed)
|
352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
353
|
+
# HTTP header 'Content-Type'
|
354
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
355
|
+
|
356
|
+
# form parameters
|
357
|
+
form_params = {}
|
358
|
+
|
359
|
+
# http body (model)
|
360
|
+
post_body = nil
|
361
|
+
auth_names = ['jwt']
|
362
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => 'SecretKeyResponse')
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#get_secret_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
371
|
+
end
|
372
|
+
return data, status_code, headers
|
373
|
+
end
|
374
|
+
|
375
|
+
#
|
376
|
+
# Get the specified service account.
|
377
|
+
# @param service_account_id Identifies the service account.
|
378
|
+
# @param [Hash] opts the optional parameters
|
379
|
+
# @return [ServiceAccountResponse]
|
380
|
+
def get_service_account(service_account_id, opts = {})
|
381
|
+
data, _status_code, _headers = get_service_account_with_http_info(service_account_id, opts)
|
382
|
+
return data
|
383
|
+
end
|
384
|
+
|
385
|
+
#
|
386
|
+
# Get the specified service account.
|
387
|
+
# @param service_account_id Identifies the service account.
|
388
|
+
# @param [Hash] opts the optional parameters
|
389
|
+
# @return [Array<(ServiceAccountResponse, Fixnum, Hash)>] ServiceAccountResponse data, response status code and response headers
|
390
|
+
def get_service_account_with_http_info(service_account_id, opts = {})
|
391
|
+
if @api_client.config.debugging
|
392
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.get_service_account ..."
|
393
|
+
end
|
394
|
+
# verify the required parameter 'service_account_id' is set
|
395
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
396
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.get_service_account"
|
397
|
+
end
|
398
|
+
# resource path
|
399
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s)
|
400
|
+
|
401
|
+
# query parameters
|
402
|
+
query_params = {}
|
403
|
+
|
404
|
+
# header parameters
|
405
|
+
header_params = {}
|
406
|
+
# HTTP header 'Accept' (if needed)
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
408
|
+
# HTTP header 'Content-Type'
|
409
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
410
|
+
|
411
|
+
# form parameters
|
412
|
+
form_params = {}
|
413
|
+
|
414
|
+
# http body (model)
|
415
|
+
post_body = nil
|
416
|
+
auth_names = ['jwt']
|
417
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
418
|
+
:header_params => header_params,
|
419
|
+
:query_params => query_params,
|
420
|
+
:form_params => form_params,
|
421
|
+
:body => post_body,
|
422
|
+
:auth_names => auth_names,
|
423
|
+
:return_type => 'ServiceAccountResponse')
|
424
|
+
if @api_client.config.debugging
|
425
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#get_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
426
|
+
end
|
427
|
+
return data, status_code, headers
|
428
|
+
end
|
429
|
+
|
430
|
+
#
|
431
|
+
# List the secret keys for the specified service account.
|
432
|
+
# @param service_account_id Identifies the service account.
|
433
|
+
# @param [Hash] opts the optional parameters
|
434
|
+
# @return [ListSecretKeysResponse]
|
435
|
+
def list_secret_keys(service_account_id, opts = {})
|
436
|
+
data, _status_code, _headers = list_secret_keys_with_http_info(service_account_id, opts)
|
437
|
+
return data
|
438
|
+
end
|
439
|
+
|
440
|
+
#
|
441
|
+
# List the secret keys for the specified service account.
|
442
|
+
# @param service_account_id Identifies the service account.
|
443
|
+
# @param [Hash] opts the optional parameters
|
444
|
+
# @return [Array<(ListSecretKeysResponse, Fixnum, Hash)>] ListSecretKeysResponse data, response status code and response headers
|
445
|
+
def list_secret_keys_with_http_info(service_account_id, opts = {})
|
446
|
+
if @api_client.config.debugging
|
447
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.list_secret_keys ..."
|
448
|
+
end
|
449
|
+
# verify the required parameter 'service_account_id' is set
|
450
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
451
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.list_secret_keys"
|
452
|
+
end
|
453
|
+
# resource path
|
454
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}/keys".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s)
|
455
|
+
|
456
|
+
# query parameters
|
457
|
+
query_params = {}
|
458
|
+
|
459
|
+
# header parameters
|
460
|
+
header_params = {}
|
461
|
+
# HTTP header 'Accept' (if needed)
|
462
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
463
|
+
# HTTP header 'Content-Type'
|
464
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
465
|
+
|
466
|
+
# form parameters
|
467
|
+
form_params = {}
|
468
|
+
|
469
|
+
# http body (model)
|
470
|
+
post_body = nil
|
471
|
+
auth_names = ['jwt']
|
472
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => 'ListSecretKeysResponse')
|
479
|
+
if @api_client.config.debugging
|
480
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#list_secret_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
481
|
+
end
|
482
|
+
return data, status_code, headers
|
483
|
+
end
|
484
|
+
|
485
|
+
#
|
486
|
+
# List all service accounts configured.
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @option opts [Integer] :limit The number of records to return. (default to 25)
|
489
|
+
# @option opts [Integer] :offset The number of initial records to skip before picking records to return. (default to 0)
|
490
|
+
# @return [ListServiceAccountsResponse]
|
491
|
+
def list_service_accounts(opts = {})
|
492
|
+
data, _status_code, _headers = list_service_accounts_with_http_info(opts)
|
493
|
+
return data
|
494
|
+
end
|
495
|
+
|
496
|
+
#
|
497
|
+
# List all service accounts configured.
|
498
|
+
# @param [Hash] opts the optional parameters
|
499
|
+
# @option opts [Integer] :limit The number of records to return.
|
500
|
+
# @option opts [Integer] :offset The number of initial records to skip before picking records to return.
|
501
|
+
# @return [Array<(ListServiceAccountsResponse, Fixnum, Hash)>] ListServiceAccountsResponse data, response status code and response headers
|
502
|
+
def list_service_accounts_with_http_info(opts = {})
|
503
|
+
if @api_client.config.debugging
|
504
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.list_service_accounts ..."
|
505
|
+
end
|
506
|
+
# resource path
|
507
|
+
local_var_path = "/serviceaccounts"
|
508
|
+
|
509
|
+
# query parameters
|
510
|
+
query_params = {}
|
511
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
512
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
513
|
+
|
514
|
+
# header parameters
|
515
|
+
header_params = {}
|
516
|
+
# HTTP header 'Accept' (if needed)
|
517
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
518
|
+
# HTTP header 'Content-Type'
|
519
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
520
|
+
|
521
|
+
# form parameters
|
522
|
+
form_params = {}
|
523
|
+
|
524
|
+
# http body (model)
|
525
|
+
post_body = nil
|
526
|
+
auth_names = ['jwt']
|
527
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
528
|
+
:header_params => header_params,
|
529
|
+
:query_params => query_params,
|
530
|
+
:form_params => form_params,
|
531
|
+
:body => post_body,
|
532
|
+
:auth_names => auth_names,
|
533
|
+
:return_type => 'ListServiceAccountsResponse')
|
534
|
+
if @api_client.config.debugging
|
535
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#list_service_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
536
|
+
end
|
537
|
+
return data, status_code, headers
|
538
|
+
end
|
539
|
+
|
540
|
+
#
|
541
|
+
# Update the specified service account.
|
542
|
+
# @param service_account_id Identifies the service account.
|
543
|
+
# @param service_account_update_body Body for an updateServiceAccount request.
|
544
|
+
# @param [Hash] opts the optional parameters
|
545
|
+
# @return [ServiceAccountResponse]
|
546
|
+
def update_service_account(service_account_id, service_account_update_body, opts = {})
|
547
|
+
data, _status_code, _headers = update_service_account_with_http_info(service_account_id, service_account_update_body, opts)
|
548
|
+
return data
|
549
|
+
end
|
550
|
+
|
551
|
+
#
|
552
|
+
# Update the specified service account.
|
553
|
+
# @param service_account_id Identifies the service account.
|
554
|
+
# @param service_account_update_body Body for an updateServiceAccount request.
|
555
|
+
# @param [Hash] opts the optional parameters
|
556
|
+
# @return [Array<(ServiceAccountResponse, Fixnum, Hash)>] ServiceAccountResponse data, response status code and response headers
|
557
|
+
def update_service_account_with_http_info(service_account_id, service_account_update_body, opts = {})
|
558
|
+
if @api_client.config.debugging
|
559
|
+
@api_client.config.logger.debug "Calling API: ServiceAccountApi.update_service_account ..."
|
560
|
+
end
|
561
|
+
# verify the required parameter 'service_account_id' is set
|
562
|
+
if @api_client.config.client_side_validation && service_account_id.nil?
|
563
|
+
fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountApi.update_service_account"
|
564
|
+
end
|
565
|
+
# verify the required parameter 'service_account_update_body' is set
|
566
|
+
if @api_client.config.client_side_validation && service_account_update_body.nil?
|
567
|
+
fail ArgumentError, "Missing the required parameter 'service_account_update_body' when calling ServiceAccountApi.update_service_account"
|
568
|
+
end
|
569
|
+
# resource path
|
570
|
+
local_var_path = "/serviceaccounts/{serviceAccountId}".sub('{' + 'serviceAccountId' + '}', service_account_id.to_s)
|
571
|
+
|
572
|
+
# query parameters
|
573
|
+
query_params = {}
|
574
|
+
|
575
|
+
# header parameters
|
576
|
+
header_params = {}
|
577
|
+
# HTTP header 'Accept' (if needed)
|
578
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
579
|
+
# HTTP header 'Content-Type'
|
580
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
581
|
+
|
582
|
+
# form parameters
|
583
|
+
form_params = {}
|
584
|
+
|
585
|
+
# http body (model)
|
586
|
+
post_body = @api_client.object_to_http_body(service_account_update_body)
|
587
|
+
auth_names = ['jwt']
|
588
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
589
|
+
:header_params => header_params,
|
590
|
+
:query_params => query_params,
|
591
|
+
:form_params => form_params,
|
592
|
+
:body => post_body,
|
593
|
+
:auth_names => auth_names,
|
594
|
+
:return_type => 'ServiceAccountResponse')
|
595
|
+
if @api_client.config.debugging
|
596
|
+
@api_client.config.logger.debug "API called: ServiceAccountApi#update_service_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
597
|
+
end
|
598
|
+
return data, status_code, headers
|
599
|
+
end
|
600
|
+
end
|
601
|
+
end
|