hooksniff 0.1.0 → 0.3.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 +4 -4
- data/README.md +4 -1
- data/lib/openapi_client/api/admin_api.rb +452 -0
- data/lib/openapi_client/api/alerts_api.rb +322 -0
- data/lib/openapi_client/api/analytics_api.rb +208 -0
- data/lib/openapi_client/api/api_keys_api.rb +252 -0
- data/lib/openapi_client/api/audit_log_api.rb +140 -0
- data/lib/openapi_client/api/auth_api.rb +1080 -0
- data/lib/openapi_client/api/billing_api.rb +500 -0
- data/lib/openapi_client/api/contact_api.rb +88 -0
- data/lib/openapi_client/api/custom_domains_api.rb +253 -0
- data/lib/openapi_client/api/customer_portal_api.rb +700 -0
- data/lib/openapi_client/api/delivery_details_api.rb +146 -0
- data/lib/openapi_client/api/devices_api.rb +202 -0
- data/lib/openapi_client/api/embed_api.rb +128 -0
- data/lib/openapi_client/api/endpoints_api.rb +468 -0
- data/lib/openapi_client/api/events_api.rb +75 -0
- data/lib/openapi_client/api/health_api.rb +193 -0
- data/lib/openapi_client/api/inbound_api.rb +170 -0
- data/lib/openapi_client/api/notifications_api.rb +309 -0
- data/lib/openapi_client/api/o_auth_api.rb +181 -0
- data/lib/openapi_client/api/outbound_ips_api.rb +77 -0
- data/lib/openapi_client/api/playground_api.rb +143 -0
- data/lib/openapi_client/api/rate_limits_api.rb +252 -0
- data/lib/openapi_client/api/routing_api.rb +393 -0
- data/lib/openapi_client/api/schemas_api.rb +268 -0
- data/lib/openapi_client/api/search_api.rb +96 -0
- data/lib/openapi_client/api/simulator_api.rb +82 -0
- data/lib/openapi_client/api/sso_api.rb +241 -0
- data/lib/openapi_client/api/stats_api.rb +77 -0
- data/lib/openapi_client/api/stream_api.rb +88 -0
- data/lib/openapi_client/api/teams_api.rb +476 -0
- data/lib/openapi_client/api/templates_api.rb +213 -0
- data/lib/openapi_client/api/transforms_api.rb +368 -0
- data/lib/openapi_client/api/webhooks_api.rb +534 -0
- data/lib/openapi_client/api_client.rb +397 -0
- data/lib/openapi_client/api_error.rb +58 -0
- data/lib/openapi_client/api_model_base.rb +88 -0
- data/lib/openapi_client/configuration.rb +312 -0
- data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +165 -0
- data/lib/openapi_client/models/admin_sdk_update_post_request.rb +156 -0
- data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +181 -0
- data/lib/openapi_client/models/admin_users_id_status_put_request.rb +147 -0
- data/lib/openapi_client/models/alert_rule.rb +237 -0
- data/lib/openapi_client/models/api_key_info.rb +185 -0
- data/lib/openapi_client/models/apply_template_request.rb +173 -0
- data/lib/openapi_client/models/apply_template_response.rb +156 -0
- data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +156 -0
- data/lib/openapi_client/models/auth_login_post200_response.rb +104 -0
- data/lib/openapi_client/models/auth_response.rb +167 -0
- data/lib/openapi_client/models/batch_replay_request.rb +166 -0
- data/lib/openapi_client/models/batch_response.rb +160 -0
- data/lib/openapi_client/models/batch_response_errors_inner.rb +156 -0
- data/lib/openapi_client/models/batch_webhook_request.rb +166 -0
- data/lib/openapi_client/models/billing_portal_post200_response.rb +147 -0
- data/lib/openapi_client/models/change_password_request.rb +199 -0
- data/lib/openapi_client/models/change_role_request.rb +188 -0
- data/lib/openapi_client/models/confirm2fa_request.rb +182 -0
- data/lib/openapi_client/models/contact_request.rb +242 -0
- data/lib/openapi_client/models/contact_response.rb +156 -0
- data/lib/openapi_client/models/create_alert_request.rb +277 -0
- data/lib/openapi_client/models/create_api_key_response.rb +175 -0
- data/lib/openapi_client/models/create_endpoint_request.rb +288 -0
- data/lib/openapi_client/models/create_team_request.rb +164 -0
- data/lib/openapi_client/models/create_transform_rule_request.rb +216 -0
- data/lib/openapi_client/models/create_webhook_request.rb +201 -0
- data/lib/openapi_client/models/custom_domains_post_request.rb +147 -0
- data/lib/openapi_client/models/customer_response.rb +256 -0
- data/lib/openapi_client/models/delivery.rb +246 -0
- data/lib/openapi_client/models/delivery_attempt.rb +205 -0
- data/lib/openapi_client/models/delivery_list_response.rb +176 -0
- data/lib/openapi_client/models/delivery_trend_response.rb +158 -0
- data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +174 -0
- data/lib/openapi_client/models/device_token_response.rb +174 -0
- data/lib/openapi_client/models/disable2fa_request.rb +164 -0
- data/lib/openapi_client/models/enable2fa_request.rb +164 -0
- data/lib/openapi_client/models/endpoint.rb +321 -0
- data/lib/openapi_client/models/endpoint_health.rb +183 -0
- data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +156 -0
- data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +156 -0
- data/lib/openapi_client/models/error.rb +165 -0
- data/lib/openapi_client/models/forgot_password_request.rb +164 -0
- data/lib/openapi_client/models/invite_request.rb +207 -0
- data/lib/openapi_client/models/invoice_response.rb +183 -0
- data/lib/openapi_client/models/latency_trend_response.rb +167 -0
- data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +165 -0
- data/lib/openapi_client/models/login_request.rb +190 -0
- data/lib/openapi_client/models/notification.rb +193 -0
- data/lib/openapi_client/models/notification_list_response.rb +167 -0
- data/lib/openapi_client/models/notification_preferences.rb +201 -0
- data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +147 -0
- data/lib/openapi_client/models/outbound_ips_response.rb +158 -0
- data/lib/openapi_client/models/paginated_users.rb +176 -0
- data/lib/openapi_client/models/playground_get200_response.rb +160 -0
- data/lib/openapi_client/models/portal_notifications_put200_response.rb +156 -0
- data/lib/openapi_client/models/portal_profile.rb +184 -0
- data/lib/openapi_client/models/refresh_token_request.rb +164 -0
- data/lib/openapi_client/models/register_device_request.rb +208 -0
- data/lib/openapi_client/models/register_request.rb +201 -0
- data/lib/openapi_client/models/register_schema_request.rb +191 -0
- data/lib/openapi_client/models/resend_verification_request.rb +164 -0
- data/lib/openapi_client/models/reset_password_request.rb +199 -0
- data/lib/openapi_client/models/retry_policy.rb +216 -0
- data/lib/openapi_client/models/routing_info.rb +193 -0
- data/lib/openapi_client/models/search_result.rb +158 -0
- data/lib/openapi_client/models/simulator_post_request.rb +165 -0
- data/lib/openapi_client/models/sso_config_post_request.rb +190 -0
- data/lib/openapi_client/models/stats_response.rb +210 -0
- data/lib/openapi_client/models/stream_params.rb +201 -0
- data/lib/openapi_client/models/subscription_response.rb +201 -0
- data/lib/openapi_client/models/success_rate_response.rb +183 -0
- data/lib/openapi_client/models/system_stats.rb +185 -0
- data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +156 -0
- data/lib/openapi_client/models/system_status.rb +210 -0
- data/lib/openapi_client/models/system_status_components_inner.rb +184 -0
- data/lib/openapi_client/models/team.rb +165 -0
- data/lib/openapi_client/models/team_detail_response.rb +169 -0
- data/lib/openapi_client/models/team_invite.rb +174 -0
- data/lib/openapi_client/models/team_member.rb +193 -0
- data/lib/openapi_client/models/test_webhook_request.rb +199 -0
- data/lib/openapi_client/models/test_webhook_response.rb +174 -0
- data/lib/openapi_client/models/transform_rule.rb +201 -0
- data/lib/openapi_client/models/two_factor_required_response.rb +165 -0
- data/lib/openapi_client/models/update_endpoint_request.rb +278 -0
- data/lib/openapi_client/models/update_notification_preferences.rb +195 -0
- data/lib/openapi_client/models/update_profile_request.rb +190 -0
- data/lib/openapi_client/models/update_routing_request.rb +190 -0
- data/lib/openapi_client/models/upgrade_request.rb +209 -0
- data/lib/openapi_client/models/upgrade_response.rb +166 -0
- data/lib/openapi_client/models/usage_response.rb +201 -0
- data/lib/openapi_client/models/user_summary.rb +193 -0
- data/lib/openapi_client/models/validate_event_request.rb +164 -0
- data/lib/openapi_client/models/verify2fa_request.rb +208 -0
- data/lib/openapi_client/models/verify_email_request.rb +164 -0
- data/lib/openapi_client/models/webhook_template.rb +183 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +169 -0
- metadata +139 -10
- data/lib/hooksniff/client.rb +0 -213
- data/lib/hooksniff/errors.rb +0 -43
- data/lib/hooksniff/models.rb +0 -136
- data/lib/hooksniff/verification.rb +0 -134
- data/lib/hooksniff/version.rb +0 -5
- data/lib/hooksniff.rb +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97532c0ab6de4c3b1427b22a571a2637cb1d8c666b5d90c96a303ee43b100e8b
|
|
4
|
+
data.tar.gz: 40cf971ef0f0b0641621af647b3791a87821c894545eac6366ea4c05df888c84
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fc3db5d623e798a34e9983930a97aa8a05dd319cf48004d34dc4fa5dfeee54d6c40a0350469950ba985cd77ee7e5d4ca4b11757d051540036db213e96920610
|
|
7
|
+
data.tar.gz: ca1157a3ec1a9384ad2a2fae4fe185f0b761f4946cbcbc0eef435ba9d410f9b3f2724046edaa6980970e583c72b7640d71e77c42f2f2f6ab72bc0e235dcc5b8c
|
data/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# HookSniff Ruby SDK
|
|
2
2
|
|
|
3
|
+
[](https://rubygems.org/gems/hooksniff)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
3
6
|
Official Ruby client for the [HookSniff](https://hooksniff.vercel.app) webhook delivery service.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
@@ -124,7 +127,7 @@ require "sinatra"
|
|
|
124
127
|
|
|
125
128
|
post "/webhook" do
|
|
126
129
|
payload = request.body.read
|
|
127
|
-
signature = request.env["
|
|
130
|
+
signature = request.env["HTTP_X_HOOKSNIFF_SIGNATURE"]
|
|
128
131
|
secret = "whsec_your_endpoint_signing_secret"
|
|
129
132
|
|
|
130
133
|
unless HookSniff.verify_signature(payload, signature, secret)
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#HookSniff API
|
|
3
|
+
|
|
4
|
+
#Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@hooksniff.vercel.app
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module OpenapiClient
|
|
16
|
+
class AdminApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Revenue by month (admin)
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [Array<AdminRevenueGet200ResponseInner>]
|
|
25
|
+
def admin_revenue_get(opts = {})
|
|
26
|
+
data, _status_code, _headers = admin_revenue_get_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Revenue by month (admin)
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(Array<AdminRevenueGet200ResponseInner>, Integer, Hash)>] Array<AdminRevenueGet200ResponseInner> data, response status code and response headers
|
|
33
|
+
def admin_revenue_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_revenue_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/admin/revenue'
|
|
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] || 'Array<AdminRevenueGet200ResponseInner>'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"AdminApi.admin_revenue_get",
|
|
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: AdminApi#admin_revenue_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Send SDK update notification to users
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @option opts [AdminSdkUpdatePostRequest] :admin_sdk_update_post_request
|
|
80
|
+
# @return [nil]
|
|
81
|
+
def admin_sdk_update_post(opts = {})
|
|
82
|
+
admin_sdk_update_post_with_http_info(opts)
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Send SDK update notification to users
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [AdminSdkUpdatePostRequest] :admin_sdk_update_post_request
|
|
89
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
90
|
+
def admin_sdk_update_post_with_http_info(opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_sdk_update_post ...'
|
|
93
|
+
end
|
|
94
|
+
# resource path
|
|
95
|
+
local_var_path = '/admin/sdk-update'
|
|
96
|
+
|
|
97
|
+
# query parameters
|
|
98
|
+
query_params = opts[:query_params] || {}
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = opts[:header_params] || {}
|
|
102
|
+
# HTTP header 'Content-Type'
|
|
103
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
104
|
+
if !content_type.nil?
|
|
105
|
+
header_params['Content-Type'] = content_type
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# form parameters
|
|
109
|
+
form_params = opts[:form_params] || {}
|
|
110
|
+
|
|
111
|
+
# http body (model)
|
|
112
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_sdk_update_post_request'])
|
|
113
|
+
|
|
114
|
+
# return_type
|
|
115
|
+
return_type = opts[:debug_return_type]
|
|
116
|
+
|
|
117
|
+
# auth_names
|
|
118
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
119
|
+
|
|
120
|
+
new_options = opts.merge(
|
|
121
|
+
:operation => :"AdminApi.admin_sdk_update_post",
|
|
122
|
+
:header_params => header_params,
|
|
123
|
+
:query_params => query_params,
|
|
124
|
+
:form_params => form_params,
|
|
125
|
+
:body => post_body,
|
|
126
|
+
:auth_names => auth_names,
|
|
127
|
+
:return_type => return_type
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_sdk_update_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
|
+
end
|
|
134
|
+
return data, status_code, headers
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# System-wide statistics (admin)
|
|
138
|
+
# @param [Hash] opts the optional parameters
|
|
139
|
+
# @return [SystemStats]
|
|
140
|
+
def admin_stats_get(opts = {})
|
|
141
|
+
data, _status_code, _headers = admin_stats_get_with_http_info(opts)
|
|
142
|
+
data
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# System-wide statistics (admin)
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [Array<(SystemStats, Integer, Hash)>] SystemStats data, response status code and response headers
|
|
148
|
+
def admin_stats_get_with_http_info(opts = {})
|
|
149
|
+
if @api_client.config.debugging
|
|
150
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_stats_get ...'
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/admin/stats'
|
|
154
|
+
|
|
155
|
+
# query parameters
|
|
156
|
+
query_params = opts[:query_params] || {}
|
|
157
|
+
|
|
158
|
+
# header parameters
|
|
159
|
+
header_params = opts[:header_params] || {}
|
|
160
|
+
# HTTP header 'Accept' (if needed)
|
|
161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
162
|
+
|
|
163
|
+
# form parameters
|
|
164
|
+
form_params = opts[:form_params] || {}
|
|
165
|
+
|
|
166
|
+
# http body (model)
|
|
167
|
+
post_body = opts[:debug_body]
|
|
168
|
+
|
|
169
|
+
# return_type
|
|
170
|
+
return_type = opts[:debug_return_type] || 'SystemStats'
|
|
171
|
+
|
|
172
|
+
# auth_names
|
|
173
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
174
|
+
|
|
175
|
+
new_options = opts.merge(
|
|
176
|
+
:operation => :"AdminApi.admin_stats_get",
|
|
177
|
+
:header_params => header_params,
|
|
178
|
+
:query_params => query_params,
|
|
179
|
+
:form_params => form_params,
|
|
180
|
+
:body => post_body,
|
|
181
|
+
:auth_names => auth_names,
|
|
182
|
+
:return_type => return_type
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_stats_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
188
|
+
end
|
|
189
|
+
return data, status_code, headers
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# List all users (admin)
|
|
193
|
+
# @param [Hash] opts the optional parameters
|
|
194
|
+
# @option opts [Integer] :page
|
|
195
|
+
# @option opts [Integer] :per_page
|
|
196
|
+
# @return [PaginatedUsers]
|
|
197
|
+
def admin_users_get(opts = {})
|
|
198
|
+
data, _status_code, _headers = admin_users_get_with_http_info(opts)
|
|
199
|
+
data
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# List all users (admin)
|
|
203
|
+
# @param [Hash] opts the optional parameters
|
|
204
|
+
# @option opts [Integer] :page
|
|
205
|
+
# @option opts [Integer] :per_page
|
|
206
|
+
# @return [Array<(PaginatedUsers, Integer, Hash)>] PaginatedUsers data, response status code and response headers
|
|
207
|
+
def admin_users_get_with_http_info(opts = {})
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_users_get ...'
|
|
210
|
+
end
|
|
211
|
+
# resource path
|
|
212
|
+
local_var_path = '/admin/users'
|
|
213
|
+
|
|
214
|
+
# query parameters
|
|
215
|
+
query_params = opts[:query_params] || {}
|
|
216
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
217
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
218
|
+
|
|
219
|
+
# header parameters
|
|
220
|
+
header_params = opts[:header_params] || {}
|
|
221
|
+
# HTTP header 'Accept' (if needed)
|
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
223
|
+
|
|
224
|
+
# form parameters
|
|
225
|
+
form_params = opts[:form_params] || {}
|
|
226
|
+
|
|
227
|
+
# http body (model)
|
|
228
|
+
post_body = opts[:debug_body]
|
|
229
|
+
|
|
230
|
+
# return_type
|
|
231
|
+
return_type = opts[:debug_return_type] || 'PaginatedUsers'
|
|
232
|
+
|
|
233
|
+
# auth_names
|
|
234
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
235
|
+
|
|
236
|
+
new_options = opts.merge(
|
|
237
|
+
:operation => :"AdminApi.admin_users_get",
|
|
238
|
+
:header_params => header_params,
|
|
239
|
+
:query_params => query_params,
|
|
240
|
+
:form_params => form_params,
|
|
241
|
+
:body => post_body,
|
|
242
|
+
:auth_names => auth_names,
|
|
243
|
+
:return_type => return_type
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
247
|
+
if @api_client.config.debugging
|
|
248
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
249
|
+
end
|
|
250
|
+
return data, status_code, headers
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Get user details (admin)
|
|
254
|
+
# @param id [String]
|
|
255
|
+
# @param [Hash] opts the optional parameters
|
|
256
|
+
# @return [nil]
|
|
257
|
+
def admin_users_id_get(id, opts = {})
|
|
258
|
+
admin_users_id_get_with_http_info(id, opts)
|
|
259
|
+
nil
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Get user details (admin)
|
|
263
|
+
# @param id [String]
|
|
264
|
+
# @param [Hash] opts the optional parameters
|
|
265
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
266
|
+
def admin_users_id_get_with_http_info(id, opts = {})
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_users_id_get ...'
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'id' is set
|
|
271
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_users_id_get"
|
|
273
|
+
end
|
|
274
|
+
# resource path
|
|
275
|
+
local_var_path = '/admin/users/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
276
|
+
|
|
277
|
+
# query parameters
|
|
278
|
+
query_params = opts[:query_params] || {}
|
|
279
|
+
|
|
280
|
+
# header parameters
|
|
281
|
+
header_params = opts[:header_params] || {}
|
|
282
|
+
|
|
283
|
+
# form parameters
|
|
284
|
+
form_params = opts[:form_params] || {}
|
|
285
|
+
|
|
286
|
+
# http body (model)
|
|
287
|
+
post_body = opts[:debug_body]
|
|
288
|
+
|
|
289
|
+
# return_type
|
|
290
|
+
return_type = opts[:debug_return_type]
|
|
291
|
+
|
|
292
|
+
# auth_names
|
|
293
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
294
|
+
|
|
295
|
+
new_options = opts.merge(
|
|
296
|
+
:operation => :"AdminApi.admin_users_id_get",
|
|
297
|
+
:header_params => header_params,
|
|
298
|
+
:query_params => query_params,
|
|
299
|
+
:form_params => form_params,
|
|
300
|
+
:body => post_body,
|
|
301
|
+
:auth_names => auth_names,
|
|
302
|
+
:return_type => return_type
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_users_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
308
|
+
end
|
|
309
|
+
return data, status_code, headers
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Change user plan (admin)
|
|
313
|
+
# @param id [String]
|
|
314
|
+
# @param admin_users_id_plan_put_request [AdminUsersIdPlanPutRequest]
|
|
315
|
+
# @param [Hash] opts the optional parameters
|
|
316
|
+
# @return [nil]
|
|
317
|
+
def admin_users_id_plan_put(id, admin_users_id_plan_put_request, opts = {})
|
|
318
|
+
admin_users_id_plan_put_with_http_info(id, admin_users_id_plan_put_request, opts)
|
|
319
|
+
nil
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Change user plan (admin)
|
|
323
|
+
# @param id [String]
|
|
324
|
+
# @param admin_users_id_plan_put_request [AdminUsersIdPlanPutRequest]
|
|
325
|
+
# @param [Hash] opts the optional parameters
|
|
326
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
327
|
+
def admin_users_id_plan_put_with_http_info(id, admin_users_id_plan_put_request, opts = {})
|
|
328
|
+
if @api_client.config.debugging
|
|
329
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_users_id_plan_put ...'
|
|
330
|
+
end
|
|
331
|
+
# verify the required parameter 'id' is set
|
|
332
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_users_id_plan_put"
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'admin_users_id_plan_put_request' is set
|
|
336
|
+
if @api_client.config.client_side_validation && admin_users_id_plan_put_request.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'admin_users_id_plan_put_request' when calling AdminApi.admin_users_id_plan_put"
|
|
338
|
+
end
|
|
339
|
+
# resource path
|
|
340
|
+
local_var_path = '/admin/users/{id}/plan'.sub('{id}', CGI.escape(id.to_s))
|
|
341
|
+
|
|
342
|
+
# query parameters
|
|
343
|
+
query_params = opts[:query_params] || {}
|
|
344
|
+
|
|
345
|
+
# header parameters
|
|
346
|
+
header_params = opts[:header_params] || {}
|
|
347
|
+
# HTTP header 'Content-Type'
|
|
348
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
349
|
+
if !content_type.nil?
|
|
350
|
+
header_params['Content-Type'] = content_type
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# form parameters
|
|
354
|
+
form_params = opts[:form_params] || {}
|
|
355
|
+
|
|
356
|
+
# http body (model)
|
|
357
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(admin_users_id_plan_put_request)
|
|
358
|
+
|
|
359
|
+
# return_type
|
|
360
|
+
return_type = opts[:debug_return_type]
|
|
361
|
+
|
|
362
|
+
# auth_names
|
|
363
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
364
|
+
|
|
365
|
+
new_options = opts.merge(
|
|
366
|
+
:operation => :"AdminApi.admin_users_id_plan_put",
|
|
367
|
+
:header_params => header_params,
|
|
368
|
+
:query_params => query_params,
|
|
369
|
+
:form_params => form_params,
|
|
370
|
+
:body => post_body,
|
|
371
|
+
:auth_names => auth_names,
|
|
372
|
+
:return_type => return_type
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_users_id_plan_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
378
|
+
end
|
|
379
|
+
return data, status_code, headers
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Change user status (admin)
|
|
383
|
+
# @param id [String]
|
|
384
|
+
# @param admin_users_id_status_put_request [AdminUsersIdStatusPutRequest]
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @return [nil]
|
|
387
|
+
def admin_users_id_status_put(id, admin_users_id_status_put_request, opts = {})
|
|
388
|
+
admin_users_id_status_put_with_http_info(id, admin_users_id_status_put_request, opts)
|
|
389
|
+
nil
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# Change user status (admin)
|
|
393
|
+
# @param id [String]
|
|
394
|
+
# @param admin_users_id_status_put_request [AdminUsersIdStatusPutRequest]
|
|
395
|
+
# @param [Hash] opts the optional parameters
|
|
396
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
397
|
+
def admin_users_id_status_put_with_http_info(id, admin_users_id_status_put_request, opts = {})
|
|
398
|
+
if @api_client.config.debugging
|
|
399
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_users_id_status_put ...'
|
|
400
|
+
end
|
|
401
|
+
# verify the required parameter 'id' is set
|
|
402
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
403
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_users_id_status_put"
|
|
404
|
+
end
|
|
405
|
+
# verify the required parameter 'admin_users_id_status_put_request' is set
|
|
406
|
+
if @api_client.config.client_side_validation && admin_users_id_status_put_request.nil?
|
|
407
|
+
fail ArgumentError, "Missing the required parameter 'admin_users_id_status_put_request' when calling AdminApi.admin_users_id_status_put"
|
|
408
|
+
end
|
|
409
|
+
# resource path
|
|
410
|
+
local_var_path = '/admin/users/{id}/status'.sub('{id}', CGI.escape(id.to_s))
|
|
411
|
+
|
|
412
|
+
# query parameters
|
|
413
|
+
query_params = opts[:query_params] || {}
|
|
414
|
+
|
|
415
|
+
# header parameters
|
|
416
|
+
header_params = opts[:header_params] || {}
|
|
417
|
+
# HTTP header 'Content-Type'
|
|
418
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
419
|
+
if !content_type.nil?
|
|
420
|
+
header_params['Content-Type'] = content_type
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# form parameters
|
|
424
|
+
form_params = opts[:form_params] || {}
|
|
425
|
+
|
|
426
|
+
# http body (model)
|
|
427
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(admin_users_id_status_put_request)
|
|
428
|
+
|
|
429
|
+
# return_type
|
|
430
|
+
return_type = opts[:debug_return_type]
|
|
431
|
+
|
|
432
|
+
# auth_names
|
|
433
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
434
|
+
|
|
435
|
+
new_options = opts.merge(
|
|
436
|
+
:operation => :"AdminApi.admin_users_id_status_put",
|
|
437
|
+
:header_params => header_params,
|
|
438
|
+
:query_params => query_params,
|
|
439
|
+
:form_params => form_params,
|
|
440
|
+
:body => post_body,
|
|
441
|
+
:auth_names => auth_names,
|
|
442
|
+
:return_type => return_type
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
446
|
+
if @api_client.config.debugging
|
|
447
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_users_id_status_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
448
|
+
end
|
|
449
|
+
return data, status_code, headers
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
end
|