agent_push_kit 0.1.0
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +145 -0
- data/LICENSE +21 -0
- data/README.md +195 -0
- data/Rakefile +10 -0
- data/agent_push_kit.gemspec +39 -0
- data/docs/AcceptedResponse.md +18 -0
- data/docs/AccountApi.md +137 -0
- data/docs/AddMemberInput.md +18 -0
- data/docs/AgentToken.md +30 -0
- data/docs/AgentTokenCreated.md +32 -0
- data/docs/AgentTokensApi.md +279 -0
- data/docs/ApiKeySummary.md +22 -0
- data/docs/AuthResponse.md +24 -0
- data/docs/AuthenticationApi.md +385 -0
- data/docs/CreateAgentTokenInput.md +18 -0
- data/docs/CreateOrganizationInput.md +18 -0
- data/docs/CurrentAccount.md +20 -0
- data/docs/CustomerAccountsApi.md +348 -0
- data/docs/DeletedResponse.md +18 -0
- data/docs/DeliverySummary.md +24 -0
- data/docs/Device.md +28 -0
- data/docs/DevicesApi.md +344 -0
- data/docs/DisabledResponse.md +18 -0
- data/docs/ErrorResponse.md +22 -0
- data/docs/EventDetail.md +36 -0
- data/docs/EventFilter.md +53 -0
- data/docs/EventPage.md +20 -0
- data/docs/EventSummary.md +32 -0
- data/docs/EventsApi.md +505 -0
- data/docs/FilterGroup.md +20 -0
- data/docs/FilterNot.md +20 -0
- data/docs/HealthApi.md +67 -0
- data/docs/HealthResponse.md +20 -0
- data/docs/IngestionResult.md +22 -0
- data/docs/InheritedResponse.md +18 -0
- data/docs/Membership.md +24 -0
- data/docs/MembershipUser.md +22 -0
- data/docs/Organization.md +32 -0
- data/docs/OrganizationApiKeyCreated.md +24 -0
- data/docs/OrganizationCount.md +20 -0
- data/docs/OrganizationCreated.md +20 -0
- data/docs/OrganizationRecord.md +24 -0
- data/docs/PasswordLoginInput.md +20 -0
- data/docs/PasswordResetCompleteInput.md +20 -0
- data/docs/PasswordResetRequestInput.md +18 -0
- data/docs/PreferenceRecord.md +24 -0
- data/docs/PreferencesApi.md +287 -0
- data/docs/ProviderLoginInput.md +20 -0
- data/docs/RegisterDeviceInput.md +24 -0
- data/docs/RegisterInput.md +22 -0
- data/docs/RegisterWebPushSubscriptionInput.md +20 -0
- data/docs/RegisterWebPushSubscriptionInputKeys.md +20 -0
- data/docs/RevokedResponse.md +18 -0
- data/docs/SearchEventsInput.md +22 -0
- data/docs/SendEventInput.md +32 -0
- data/docs/Service.md +26 -0
- data/docs/ServiceAllOfCount.md +18 -0
- data/docs/ServicePreference.md +26 -0
- data/docs/ServiceSummary.md +22 -0
- data/docs/SetEnabledInput.md +18 -0
- data/docs/TextFilterCondition.md +22 -0
- data/docs/TimeFilterCondition.md +22 -0
- data/docs/TypeOverride.md +22 -0
- data/docs/User.md +28 -0
- data/docs/WebPushConfiguration.md +20 -0
- data/docs/WebPushSubscription.md +22 -0
- data/git_push.sh +57 -0
- data/lib/agent_push_kit/api/account_api.rb +132 -0
- data/lib/agent_push_kit/api/agent_tokens_api.rb +274 -0
- data/lib/agent_push_kit/api/authentication_api.rb +418 -0
- data/lib/agent_push_kit/api/customer_accounts_api.rb +339 -0
- data/lib/agent_push_kit/api/devices_api.rb +339 -0
- data/lib/agent_push_kit/api/events_api.rb +520 -0
- data/lib/agent_push_kit/api/health_api.rb +77 -0
- data/lib/agent_push_kit/api/preferences_api.rb +308 -0
- data/lib/agent_push_kit/api_client.rb +397 -0
- data/lib/agent_push_kit/api_error.rb +58 -0
- data/lib/agent_push_kit/api_model_base.rb +88 -0
- data/lib/agent_push_kit/configuration.rb +325 -0
- data/lib/agent_push_kit/models/accepted_response.rb +164 -0
- data/lib/agent_push_kit/models/add_member_input.rb +173 -0
- data/lib/agent_push_kit/models/agent_token.rb +292 -0
- data/lib/agent_push_kit/models/agent_token_created.rb +364 -0
- data/lib/agent_push_kit/models/api_key_summary.rb +165 -0
- data/lib/agent_push_kit/models/auth_response.rb +228 -0
- data/lib/agent_push_kit/models/create_agent_token_input.rb +182 -0
- data/lib/agent_push_kit/models/create_organization_input.rb +182 -0
- data/lib/agent_push_kit/models/current_account.rb +192 -0
- data/lib/agent_push_kit/models/deleted_response.rb +164 -0
- data/lib/agent_push_kit/models/delivery_summary.rb +242 -0
- data/lib/agent_push_kit/models/device.rb +304 -0
- data/lib/agent_push_kit/models/disabled_response.rb +164 -0
- data/lib/agent_push_kit/models/error_response.rb +199 -0
- data/lib/agent_push_kit/models/event_detail.rb +393 -0
- data/lib/agent_push_kit/models/event_filter.rb +106 -0
- data/lib/agent_push_kit/models/event_page.rb +178 -0
- data/lib/agent_push_kit/models/event_summary.rb +318 -0
- data/lib/agent_push_kit/models/filter_group.rb +234 -0
- data/lib/agent_push_kit/models/filter_not.rb +214 -0
- data/lib/agent_push_kit/models/health_response.rb +216 -0
- data/lib/agent_push_kit/models/ingestion_result.rb +216 -0
- data/lib/agent_push_kit/models/inherited_response.rb +164 -0
- data/lib/agent_push_kit/models/membership.rb +266 -0
- data/lib/agent_push_kit/models/membership_user.rb +202 -0
- data/lib/agent_push_kit/models/organization.rb +337 -0
- data/lib/agent_push_kit/models/organization_api_key_created.rb +253 -0
- data/lib/agent_push_kit/models/organization_count.rb +156 -0
- data/lib/agent_push_kit/models/organization_created.rb +201 -0
- data/lib/agent_push_kit/models/organization_record.rb +242 -0
- data/lib/agent_push_kit/models/password_login_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_complete_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_request_input.rb +173 -0
- data/lib/agent_push_kit/models/preference_record.rb +242 -0
- data/lib/agent_push_kit/models/provider_login_input.rb +201 -0
- data/lib/agent_push_kit/models/register_device_input.rb +304 -0
- data/lib/agent_push_kit/models/register_input.rb +245 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input.rb +199 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input_keys.rb +226 -0
- data/lib/agent_push_kit/models/revoked_response.rb +164 -0
- data/lib/agent_push_kit/models/search_events_input.rb +212 -0
- data/lib/agent_push_kit/models/send_event_input.rb +427 -0
- data/lib/agent_push_kit/models/service.rb +275 -0
- data/lib/agent_push_kit/models/service_all_of_count.rb +164 -0
- data/lib/agent_push_kit/models/service_preference.rb +270 -0
- data/lib/agent_push_kit/models/service_summary.rb +216 -0
- data/lib/agent_push_kit/models/set_enabled_input.rb +164 -0
- data/lib/agent_push_kit/models/text_filter_condition.rb +260 -0
- data/lib/agent_push_kit/models/time_filter_condition.rb +242 -0
- data/lib/agent_push_kit/models/type_override.rb +216 -0
- data/lib/agent_push_kit/models/user.rb +280 -0
- data/lib/agent_push_kit/models/web_push_configuration.rb +176 -0
- data/lib/agent_push_kit/models/web_push_subscription.rb +216 -0
- data/lib/agent_push_kit/version.rb +15 -0
- data/lib/agent_push_kit.rb +101 -0
- data/spec/api/account_api_spec.rb +55 -0
- data/spec/api/agent_tokens_api_spec.rb +80 -0
- data/spec/api/authentication_api_spec.rb +101 -0
- data/spec/api/customer_accounts_api_spec.rb +91 -0
- data/spec/api/devices_api_spec.rb +89 -0
- data/spec/api/events_api_spec.rb +121 -0
- data/spec/api/health_api_spec.rb +45 -0
- data/spec/api/preferences_api_spec.rb +83 -0
- data/spec/models/accepted_response_spec.rb +36 -0
- data/spec/models/add_member_input_spec.rb +36 -0
- data/spec/models/agent_token_created_spec.rb +78 -0
- data/spec/models/agent_token_spec.rb +72 -0
- data/spec/models/api_key_summary_spec.rb +48 -0
- data/spec/models/auth_response_spec.rb +54 -0
- data/spec/models/create_agent_token_input_spec.rb +36 -0
- data/spec/models/create_organization_input_spec.rb +36 -0
- data/spec/models/current_account_spec.rb +42 -0
- data/spec/models/deleted_response_spec.rb +36 -0
- data/spec/models/delivery_summary_spec.rb +54 -0
- data/spec/models/device_spec.rb +70 -0
- data/spec/models/disabled_response_spec.rb +36 -0
- data/spec/models/error_response_spec.rb +48 -0
- data/spec/models/event_detail_spec.rb +90 -0
- data/spec/models/event_filter_spec.rb +32 -0
- data/spec/models/event_page_spec.rb +42 -0
- data/spec/models/event_summary_spec.rb +78 -0
- data/spec/models/filter_group_spec.rb +46 -0
- data/spec/models/filter_not_spec.rb +46 -0
- data/spec/models/health_response_spec.rb +50 -0
- data/spec/models/ingestion_result_spec.rb +48 -0
- data/spec/models/inherited_response_spec.rb +36 -0
- data/spec/models/membership_spec.rb +58 -0
- data/spec/models/membership_user_spec.rb +48 -0
- data/spec/models/organization_api_key_created_spec.rb +54 -0
- data/spec/models/organization_count_spec.rb +42 -0
- data/spec/models/organization_created_spec.rb +42 -0
- data/spec/models/organization_record_spec.rb +54 -0
- data/spec/models/organization_spec.rb +82 -0
- data/spec/models/password_login_input_spec.rb +42 -0
- data/spec/models/password_reset_complete_input_spec.rb +42 -0
- data/spec/models/password_reset_request_input_spec.rb +36 -0
- data/spec/models/preference_record_spec.rb +54 -0
- data/spec/models/provider_login_input_spec.rb +42 -0
- data/spec/models/register_device_input_spec.rb +58 -0
- data/spec/models/register_input_spec.rb +48 -0
- data/spec/models/register_web_push_subscription_input_keys_spec.rb +42 -0
- data/spec/models/register_web_push_subscription_input_spec.rb +42 -0
- data/spec/models/revoked_response_spec.rb +36 -0
- data/spec/models/search_events_input_spec.rb +48 -0
- data/spec/models/send_event_input_spec.rb +78 -0
- data/spec/models/service_all_of_count_spec.rb +36 -0
- data/spec/models/service_preference_spec.rb +60 -0
- data/spec/models/service_spec.rb +60 -0
- data/spec/models/service_summary_spec.rb +48 -0
- data/spec/models/set_enabled_input_spec.rb +36 -0
- data/spec/models/text_filter_condition_spec.rb +56 -0
- data/spec/models/time_filter_condition_spec.rb +56 -0
- data/spec/models/type_override_spec.rb +48 -0
- data/spec/models/user_spec.rb +66 -0
- data/spec/models/web_push_configuration_spec.rb +42 -0
- data/spec/models/web_push_subscription_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +344 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Agent Push Kit API
|
|
3
|
+
|
|
4
|
+
#The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AgentPushKit
|
|
16
|
+
class CustomerAccountsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add an already-registered user to a customer account
|
|
23
|
+
# @param organization_id [String]
|
|
24
|
+
# @param add_member_input [AddMemberInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Membership]
|
|
27
|
+
def add_organization_member(organization_id, add_member_input, opts = {})
|
|
28
|
+
data, _status_code, _headers = add_organization_member_with_http_info(organization_id, add_member_input, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Add an already-registered user to a customer account
|
|
33
|
+
# @param organization_id [String]
|
|
34
|
+
# @param add_member_input [AddMemberInput]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Membership, Integer, Hash)>] Membership data, response status code and response headers
|
|
37
|
+
def add_organization_member_with_http_info(organization_id, add_member_input, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: CustomerAccountsApi.add_organization_member ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'organization_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling CustomerAccountsApi.add_organization_member"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'add_member_input' is set
|
|
46
|
+
if @api_client.config.client_side_validation && add_member_input.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'add_member_input' when calling CustomerAccountsApi.add_organization_member"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/organizations/{organizationId}/members'.sub('{organizationId}', CGI.escape(organization_id.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
59
|
+
# HTTP header 'Content-Type'
|
|
60
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
61
|
+
if !content_type.nil?
|
|
62
|
+
header_params['Content-Type'] = content_type
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = opts[:form_params] || {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_member_input)
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'Membership'
|
|
73
|
+
|
|
74
|
+
# auth_names
|
|
75
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :"CustomerAccountsApi.add_organization_member",
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug "API called: CustomerAccountsApi#add_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Create another Agent Push Kit customer account
|
|
95
|
+
# @param create_organization_input [CreateOrganizationInput]
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [OrganizationCreated]
|
|
98
|
+
def create_organization(create_organization_input, opts = {})
|
|
99
|
+
data, _status_code, _headers = create_organization_with_http_info(create_organization_input, opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Create another Agent Push Kit customer account
|
|
104
|
+
# @param create_organization_input [CreateOrganizationInput]
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Array<(OrganizationCreated, Integer, Hash)>] OrganizationCreated data, response status code and response headers
|
|
107
|
+
def create_organization_with_http_info(create_organization_input, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: CustomerAccountsApi.create_organization ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'create_organization_input' is set
|
|
112
|
+
if @api_client.config.client_side_validation && create_organization_input.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'create_organization_input' when calling CustomerAccountsApi.create_organization"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/organizations'
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
125
|
+
# HTTP header 'Content-Type'
|
|
126
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
127
|
+
if !content_type.nil?
|
|
128
|
+
header_params['Content-Type'] = content_type
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# form parameters
|
|
132
|
+
form_params = opts[:form_params] || {}
|
|
133
|
+
|
|
134
|
+
# http body (model)
|
|
135
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_input)
|
|
136
|
+
|
|
137
|
+
# return_type
|
|
138
|
+
return_type = opts[:debug_return_type] || 'OrganizationCreated'
|
|
139
|
+
|
|
140
|
+
# auth_names
|
|
141
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
142
|
+
|
|
143
|
+
new_options = opts.merge(
|
|
144
|
+
:operation => :"CustomerAccountsApi.create_organization",
|
|
145
|
+
:header_params => header_params,
|
|
146
|
+
:query_params => query_params,
|
|
147
|
+
:form_params => form_params,
|
|
148
|
+
:body => post_body,
|
|
149
|
+
:auth_names => auth_names,
|
|
150
|
+
:return_type => return_type
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
154
|
+
if @api_client.config.debugging
|
|
155
|
+
@api_client.config.logger.debug "API called: CustomerAccountsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
156
|
+
end
|
|
157
|
+
return data, status_code, headers
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# List members of a customer account
|
|
161
|
+
# @param organization_id [String]
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [Array<Membership>]
|
|
164
|
+
def list_organization_members(organization_id, opts = {})
|
|
165
|
+
data, _status_code, _headers = list_organization_members_with_http_info(organization_id, opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# List members of a customer account
|
|
170
|
+
# @param organization_id [String]
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [Array<(Array<Membership>, Integer, Hash)>] Array<Membership> data, response status code and response headers
|
|
173
|
+
def list_organization_members_with_http_info(organization_id, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: CustomerAccountsApi.list_organization_members ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'organization_id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling CustomerAccountsApi.list_organization_members"
|
|
180
|
+
end
|
|
181
|
+
# resource path
|
|
182
|
+
local_var_path = '/organizations/{organizationId}/members'.sub('{organizationId}', CGI.escape(organization_id.to_s))
|
|
183
|
+
|
|
184
|
+
# query parameters
|
|
185
|
+
query_params = opts[:query_params] || {}
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
|
|
192
|
+
# form parameters
|
|
193
|
+
form_params = opts[:form_params] || {}
|
|
194
|
+
|
|
195
|
+
# http body (model)
|
|
196
|
+
post_body = opts[:debug_body]
|
|
197
|
+
|
|
198
|
+
# return_type
|
|
199
|
+
return_type = opts[:debug_return_type] || 'Array<Membership>'
|
|
200
|
+
|
|
201
|
+
# auth_names
|
|
202
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
203
|
+
|
|
204
|
+
new_options = opts.merge(
|
|
205
|
+
:operation => :"CustomerAccountsApi.list_organization_members",
|
|
206
|
+
:header_params => header_params,
|
|
207
|
+
:query_params => query_params,
|
|
208
|
+
:form_params => form_params,
|
|
209
|
+
:body => post_body,
|
|
210
|
+
:auth_names => auth_names,
|
|
211
|
+
:return_type => return_type
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug "API called: CustomerAccountsApi#list_organization_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
217
|
+
end
|
|
218
|
+
return data, status_code, headers
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# List customer accounts available to the current user
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @return [Array<Organization>]
|
|
224
|
+
def list_organizations(opts = {})
|
|
225
|
+
data, _status_code, _headers = list_organizations_with_http_info(opts)
|
|
226
|
+
data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# List customer accounts available to the current user
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
|
|
232
|
+
def list_organizations_with_http_info(opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: CustomerAccountsApi.list_organizations ...'
|
|
235
|
+
end
|
|
236
|
+
# resource path
|
|
237
|
+
local_var_path = '/organizations'
|
|
238
|
+
|
|
239
|
+
# query parameters
|
|
240
|
+
query_params = opts[:query_params] || {}
|
|
241
|
+
|
|
242
|
+
# header parameters
|
|
243
|
+
header_params = opts[:header_params] || {}
|
|
244
|
+
# HTTP header 'Accept' (if needed)
|
|
245
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
246
|
+
|
|
247
|
+
# form parameters
|
|
248
|
+
form_params = opts[:form_params] || {}
|
|
249
|
+
|
|
250
|
+
# http body (model)
|
|
251
|
+
post_body = opts[:debug_body]
|
|
252
|
+
|
|
253
|
+
# return_type
|
|
254
|
+
return_type = opts[:debug_return_type] || 'Array<Organization>'
|
|
255
|
+
|
|
256
|
+
# auth_names
|
|
257
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
258
|
+
|
|
259
|
+
new_options = opts.merge(
|
|
260
|
+
:operation => :"CustomerAccountsApi.list_organizations",
|
|
261
|
+
:header_params => header_params,
|
|
262
|
+
:query_params => query_params,
|
|
263
|
+
:form_params => form_params,
|
|
264
|
+
:body => post_body,
|
|
265
|
+
:auth_names => auth_names,
|
|
266
|
+
:return_type => return_type
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
270
|
+
if @api_client.config.debugging
|
|
271
|
+
@api_client.config.logger.debug "API called: CustomerAccountsApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
272
|
+
end
|
|
273
|
+
return data, status_code, headers
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Rotate the application event-ingestion key
|
|
277
|
+
# The previous `apk_` key stops working immediately. The replacement is returned only in this response.
|
|
278
|
+
# @param organization_id [String]
|
|
279
|
+
# @param [Hash] opts the optional parameters
|
|
280
|
+
# @return [OrganizationApiKeyCreated]
|
|
281
|
+
def regenerate_organization_api_key(organization_id, opts = {})
|
|
282
|
+
data, _status_code, _headers = regenerate_organization_api_key_with_http_info(organization_id, opts)
|
|
283
|
+
data
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Rotate the application event-ingestion key
|
|
287
|
+
# The previous `apk_` key stops working immediately. The replacement is returned only in this response.
|
|
288
|
+
# @param organization_id [String]
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @return [Array<(OrganizationApiKeyCreated, Integer, Hash)>] OrganizationApiKeyCreated data, response status code and response headers
|
|
291
|
+
def regenerate_organization_api_key_with_http_info(organization_id, opts = {})
|
|
292
|
+
if @api_client.config.debugging
|
|
293
|
+
@api_client.config.logger.debug 'Calling API: CustomerAccountsApi.regenerate_organization_api_key ...'
|
|
294
|
+
end
|
|
295
|
+
# verify the required parameter 'organization_id' is set
|
|
296
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
297
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling CustomerAccountsApi.regenerate_organization_api_key"
|
|
298
|
+
end
|
|
299
|
+
# resource path
|
|
300
|
+
local_var_path = '/organizations/{organizationId}/api-key/regenerate'.sub('{organizationId}', CGI.escape(organization_id.to_s))
|
|
301
|
+
|
|
302
|
+
# query parameters
|
|
303
|
+
query_params = opts[:query_params] || {}
|
|
304
|
+
|
|
305
|
+
# header parameters
|
|
306
|
+
header_params = opts[:header_params] || {}
|
|
307
|
+
# HTTP header 'Accept' (if needed)
|
|
308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
309
|
+
|
|
310
|
+
# form parameters
|
|
311
|
+
form_params = opts[:form_params] || {}
|
|
312
|
+
|
|
313
|
+
# http body (model)
|
|
314
|
+
post_body = opts[:debug_body]
|
|
315
|
+
|
|
316
|
+
# return_type
|
|
317
|
+
return_type = opts[:debug_return_type] || 'OrganizationApiKeyCreated'
|
|
318
|
+
|
|
319
|
+
# auth_names
|
|
320
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
321
|
+
|
|
322
|
+
new_options = opts.merge(
|
|
323
|
+
:operation => :"CustomerAccountsApi.regenerate_organization_api_key",
|
|
324
|
+
:header_params => header_params,
|
|
325
|
+
:query_params => query_params,
|
|
326
|
+
:form_params => form_params,
|
|
327
|
+
:body => post_body,
|
|
328
|
+
:auth_names => auth_names,
|
|
329
|
+
:return_type => return_type
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
333
|
+
if @api_client.config.debugging
|
|
334
|
+
@api_client.config.logger.debug "API called: CustomerAccountsApi#regenerate_organization_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
335
|
+
end
|
|
336
|
+
return data, status_code, headers
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
end
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Agent Push Kit API
|
|
3
|
+
|
|
4
|
+
#The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AgentPushKit
|
|
16
|
+
class DevicesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get browser push availability and its public VAPID key
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [WebPushConfiguration]
|
|
25
|
+
def get_web_push_configuration(opts = {})
|
|
26
|
+
data, _status_code, _headers = get_web_push_configuration_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Get browser push availability and its public VAPID key
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(WebPushConfiguration, Integer, Hash)>] WebPushConfiguration data, response status code and response headers
|
|
33
|
+
def get_web_push_configuration_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: DevicesApi.get_web_push_configuration ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/web-push/configuration'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type] || 'WebPushConfiguration'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"DevicesApi.get_web_push_configuration",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: DevicesApi#get_web_push_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Register or refresh an APNs device
|
|
78
|
+
# @param register_device_input [RegisterDeviceInput]
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [Device]
|
|
81
|
+
def register_device(register_device_input, opts = {})
|
|
82
|
+
data, _status_code, _headers = register_device_with_http_info(register_device_input, opts)
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Register or refresh an APNs device
|
|
87
|
+
# @param register_device_input [RegisterDeviceInput]
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(Device, Integer, Hash)>] Device data, response status code and response headers
|
|
90
|
+
def register_device_with_http_info(register_device_input, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: DevicesApi.register_device ...'
|
|
93
|
+
end
|
|
94
|
+
# verify the required parameter 'register_device_input' is set
|
|
95
|
+
if @api_client.config.client_side_validation && register_device_input.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'register_device_input' when calling DevicesApi.register_device"
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/devices'
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = opts[:query_params] || {}
|
|
103
|
+
|
|
104
|
+
# header parameters
|
|
105
|
+
header_params = opts[:header_params] || {}
|
|
106
|
+
# HTTP header 'Accept' (if needed)
|
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
108
|
+
# HTTP header 'Content-Type'
|
|
109
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
110
|
+
if !content_type.nil?
|
|
111
|
+
header_params['Content-Type'] = content_type
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# form parameters
|
|
115
|
+
form_params = opts[:form_params] || {}
|
|
116
|
+
|
|
117
|
+
# http body (model)
|
|
118
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(register_device_input)
|
|
119
|
+
|
|
120
|
+
# return_type
|
|
121
|
+
return_type = opts[:debug_return_type] || 'Device'
|
|
122
|
+
|
|
123
|
+
# auth_names
|
|
124
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
125
|
+
|
|
126
|
+
new_options = opts.merge(
|
|
127
|
+
:operation => :"DevicesApi.register_device",
|
|
128
|
+
:header_params => header_params,
|
|
129
|
+
:query_params => query_params,
|
|
130
|
+
:form_params => form_params,
|
|
131
|
+
:body => post_body,
|
|
132
|
+
:auth_names => auth_names,
|
|
133
|
+
:return_type => return_type
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "API called: DevicesApi#register_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
+
end
|
|
140
|
+
return data, status_code, headers
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Register or refresh a browser push subscription
|
|
144
|
+
# @param register_web_push_subscription_input [RegisterWebPushSubscriptionInput]
|
|
145
|
+
# @param [Hash] opts the optional parameters
|
|
146
|
+
# @return [WebPushSubscription]
|
|
147
|
+
def register_web_push_subscription(register_web_push_subscription_input, opts = {})
|
|
148
|
+
data, _status_code, _headers = register_web_push_subscription_with_http_info(register_web_push_subscription_input, opts)
|
|
149
|
+
data
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Register or refresh a browser push subscription
|
|
153
|
+
# @param register_web_push_subscription_input [RegisterWebPushSubscriptionInput]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [Array<(WebPushSubscription, Integer, Hash)>] WebPushSubscription data, response status code and response headers
|
|
156
|
+
def register_web_push_subscription_with_http_info(register_web_push_subscription_input, opts = {})
|
|
157
|
+
if @api_client.config.debugging
|
|
158
|
+
@api_client.config.logger.debug 'Calling API: DevicesApi.register_web_push_subscription ...'
|
|
159
|
+
end
|
|
160
|
+
# verify the required parameter 'register_web_push_subscription_input' is set
|
|
161
|
+
if @api_client.config.client_side_validation && register_web_push_subscription_input.nil?
|
|
162
|
+
fail ArgumentError, "Missing the required parameter 'register_web_push_subscription_input' when calling DevicesApi.register_web_push_subscription"
|
|
163
|
+
end
|
|
164
|
+
# resource path
|
|
165
|
+
local_var_path = '/web-push/subscriptions'
|
|
166
|
+
|
|
167
|
+
# query parameters
|
|
168
|
+
query_params = opts[:query_params] || {}
|
|
169
|
+
|
|
170
|
+
# header parameters
|
|
171
|
+
header_params = opts[:header_params] || {}
|
|
172
|
+
# HTTP header 'Accept' (if needed)
|
|
173
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
174
|
+
# HTTP header 'Content-Type'
|
|
175
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
176
|
+
if !content_type.nil?
|
|
177
|
+
header_params['Content-Type'] = content_type
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# form parameters
|
|
181
|
+
form_params = opts[:form_params] || {}
|
|
182
|
+
|
|
183
|
+
# http body (model)
|
|
184
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(register_web_push_subscription_input)
|
|
185
|
+
|
|
186
|
+
# return_type
|
|
187
|
+
return_type = opts[:debug_return_type] || 'WebPushSubscription'
|
|
188
|
+
|
|
189
|
+
# auth_names
|
|
190
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
191
|
+
|
|
192
|
+
new_options = opts.merge(
|
|
193
|
+
:operation => :"DevicesApi.register_web_push_subscription",
|
|
194
|
+
:header_params => header_params,
|
|
195
|
+
:query_params => query_params,
|
|
196
|
+
:form_params => form_params,
|
|
197
|
+
:body => post_body,
|
|
198
|
+
:auth_names => auth_names,
|
|
199
|
+
:return_type => return_type
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
203
|
+
if @api_client.config.debugging
|
|
204
|
+
@api_client.config.logger.debug "API called: DevicesApi#register_web_push_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
|
+
end
|
|
206
|
+
return data, status_code, headers
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Disable push delivery to one installation
|
|
210
|
+
# @param installation_id [String]
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @return [DisabledResponse]
|
|
213
|
+
def remove_device(installation_id, opts = {})
|
|
214
|
+
data, _status_code, _headers = remove_device_with_http_info(installation_id, opts)
|
|
215
|
+
data
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Disable push delivery to one installation
|
|
219
|
+
# @param installation_id [String]
|
|
220
|
+
# @param [Hash] opts the optional parameters
|
|
221
|
+
# @return [Array<(DisabledResponse, Integer, Hash)>] DisabledResponse data, response status code and response headers
|
|
222
|
+
def remove_device_with_http_info(installation_id, opts = {})
|
|
223
|
+
if @api_client.config.debugging
|
|
224
|
+
@api_client.config.logger.debug 'Calling API: DevicesApi.remove_device ...'
|
|
225
|
+
end
|
|
226
|
+
# verify the required parameter 'installation_id' is set
|
|
227
|
+
if @api_client.config.client_side_validation && installation_id.nil?
|
|
228
|
+
fail ArgumentError, "Missing the required parameter 'installation_id' when calling DevicesApi.remove_device"
|
|
229
|
+
end
|
|
230
|
+
if @api_client.config.client_side_validation && installation_id.to_s.length > 200
|
|
231
|
+
fail ArgumentError, 'invalid value for "installation_id" when calling DevicesApi.remove_device, the character length must be smaller than or equal to 200.'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @api_client.config.client_side_validation && installation_id.to_s.length < 4
|
|
235
|
+
fail ArgumentError, 'invalid value for "installation_id" when calling DevicesApi.remove_device, the character length must be greater than or equal to 4.'
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# resource path
|
|
239
|
+
local_var_path = '/devices/{installationId}'.sub('{installationId}', CGI.escape(installation_id.to_s))
|
|
240
|
+
|
|
241
|
+
# query parameters
|
|
242
|
+
query_params = opts[:query_params] || {}
|
|
243
|
+
|
|
244
|
+
# header parameters
|
|
245
|
+
header_params = opts[:header_params] || {}
|
|
246
|
+
# HTTP header 'Accept' (if needed)
|
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
248
|
+
|
|
249
|
+
# form parameters
|
|
250
|
+
form_params = opts[:form_params] || {}
|
|
251
|
+
|
|
252
|
+
# http body (model)
|
|
253
|
+
post_body = opts[:debug_body]
|
|
254
|
+
|
|
255
|
+
# return_type
|
|
256
|
+
return_type = opts[:debug_return_type] || 'DisabledResponse'
|
|
257
|
+
|
|
258
|
+
# auth_names
|
|
259
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
260
|
+
|
|
261
|
+
new_options = opts.merge(
|
|
262
|
+
:operation => :"DevicesApi.remove_device",
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => return_type
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug "API called: DevicesApi#remove_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
274
|
+
end
|
|
275
|
+
return data, status_code, headers
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Disable a browser push subscription
|
|
279
|
+
# @param subscription_id [String]
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @return [DisabledResponse]
|
|
282
|
+
def remove_web_push_subscription(subscription_id, opts = {})
|
|
283
|
+
data, _status_code, _headers = remove_web_push_subscription_with_http_info(subscription_id, opts)
|
|
284
|
+
data
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Disable a browser push subscription
|
|
288
|
+
# @param subscription_id [String]
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @return [Array<(DisabledResponse, Integer, Hash)>] DisabledResponse data, response status code and response headers
|
|
291
|
+
def remove_web_push_subscription_with_http_info(subscription_id, opts = {})
|
|
292
|
+
if @api_client.config.debugging
|
|
293
|
+
@api_client.config.logger.debug 'Calling API: DevicesApi.remove_web_push_subscription ...'
|
|
294
|
+
end
|
|
295
|
+
# verify the required parameter 'subscription_id' is set
|
|
296
|
+
if @api_client.config.client_side_validation && subscription_id.nil?
|
|
297
|
+
fail ArgumentError, "Missing the required parameter 'subscription_id' when calling DevicesApi.remove_web_push_subscription"
|
|
298
|
+
end
|
|
299
|
+
# resource path
|
|
300
|
+
local_var_path = '/web-push/subscriptions/{subscriptionId}'.sub('{subscriptionId}', CGI.escape(subscription_id.to_s))
|
|
301
|
+
|
|
302
|
+
# query parameters
|
|
303
|
+
query_params = opts[:query_params] || {}
|
|
304
|
+
|
|
305
|
+
# header parameters
|
|
306
|
+
header_params = opts[:header_params] || {}
|
|
307
|
+
# HTTP header 'Accept' (if needed)
|
|
308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
309
|
+
|
|
310
|
+
# form parameters
|
|
311
|
+
form_params = opts[:form_params] || {}
|
|
312
|
+
|
|
313
|
+
# http body (model)
|
|
314
|
+
post_body = opts[:debug_body]
|
|
315
|
+
|
|
316
|
+
# return_type
|
|
317
|
+
return_type = opts[:debug_return_type] || 'DisabledResponse'
|
|
318
|
+
|
|
319
|
+
# auth_names
|
|
320
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
321
|
+
|
|
322
|
+
new_options = opts.merge(
|
|
323
|
+
:operation => :"DevicesApi.remove_web_push_subscription",
|
|
324
|
+
:header_params => header_params,
|
|
325
|
+
:query_params => query_params,
|
|
326
|
+
:form_params => form_params,
|
|
327
|
+
:body => post_body,
|
|
328
|
+
:auth_names => auth_names,
|
|
329
|
+
:return_type => return_type
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
333
|
+
if @api_client.config.debugging
|
|
334
|
+
@api_client.config.logger.debug "API called: DevicesApi#remove_web_push_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
335
|
+
end
|
|
336
|
+
return data, status_code, headers
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
end
|