postboost 1.0.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/LICENSE +21 -0
- data/README.md +0 -0
- data/Rakefile +10 -0
- data/docs/Account.md +34 -0
- data/docs/AccountsApi.md +149 -0
- data/docs/AddGenericSubscriptionRequest.md +22 -0
- data/docs/ChangeSubscriptionPlanRequest.md +24 -0
- data/docs/CheckoutSubscription200Response.md +18 -0
- data/docs/CheckoutSubscriptionRequest.md +22 -0
- data/docs/DeleteMediaBulkRequest.md +18 -0
- data/docs/DeleteMode.md +15 -0
- data/docs/DeletePostRequest.md +20 -0
- data/docs/DeletePostsBulkRequest.md +22 -0
- data/docs/DeleteReceiptsBulkRequest.md +18 -0
- data/docs/DeleteResult.md +22 -0
- data/docs/DeleteUser400Response.md +20 -0
- data/docs/DeleteUsersBulkRequest.md +18 -0
- data/docs/DeleteWorkspacesBulkRequest.md +18 -0
- data/docs/GetRemoteUploadStatus200Response.md +20 -0
- data/docs/InitiateChunkedUpload200Response.md +22 -0
- data/docs/InitiateChunkedUploadRequest.md +22 -0
- data/docs/InitiateRemoteUpload200Response.md +49 -0
- data/docs/InitiateRemoteUpload200ResponseOneOf.md +18 -0
- data/docs/InitiateRemoteUploadRequest.md +20 -0
- data/docs/ListAccounts200Response.md +18 -0
- data/docs/ListMedia200Response.md +22 -0
- data/docs/ListPosts200Response.md +22 -0
- data/docs/ListReceipts200Response.md +22 -0
- data/docs/ListTags200Response.md +18 -0
- data/docs/ListUsers200Response.md +22 -0
- data/docs/ListWorkspaces200Response.md +22 -0
- data/docs/Media.md +34 -0
- data/docs/MediaApi.md +810 -0
- data/docs/PaginationMeta.md +20 -0
- data/docs/PaginationMetaLinks.md +24 -0
- data/docs/PaginationMetaMeta.md +28 -0
- data/docs/Post.md +36 -0
- data/docs/PostContent.md +24 -0
- data/docs/PostInput.md +34 -0
- data/docs/PostStatus.md +15 -0
- data/docs/PostVersion.md +24 -0
- data/docs/PostsApi.md +659 -0
- data/docs/Receipt.md +36 -0
- data/docs/ReceiptInput.md +34 -0
- data/docs/ReceiptUpdateInput.md +32 -0
- data/docs/ReceiptsApi.md +421 -0
- data/docs/RemoveUserFromWorkspaceRequest.md +18 -0
- data/docs/SchedulePostRequest.md +18 -0
- data/docs/ScheduleResult.md +20 -0
- data/docs/Subscription.md +32 -0
- data/docs/SubscriptionInput.md +24 -0
- data/docs/SubscriptionStatus.md +15 -0
- data/docs/SubscriptionUpdateInput.md +24 -0
- data/docs/SubscriptionsApi.md +699 -0
- data/docs/Tag.md +24 -0
- data/docs/TagInput.md +20 -0
- data/docs/TagsApi.md +357 -0
- data/docs/UpdateMediaRequest.md +18 -0
- data/docs/UploadChunk200Response.md +18 -0
- data/docs/User.md +28 -0
- data/docs/UserInput.md +26 -0
- data/docs/UserUpdateInput.md +26 -0
- data/docs/UsersApi.md +419 -0
- data/docs/Workspace.md +28 -0
- data/docs/WorkspaceInput.md +24 -0
- data/docs/WorkspaceUserInput.md +24 -0
- data/docs/WorkspacesApi.md +637 -0
- data/git_push.sh +57 -0
- data/lib/postboost/api/accounts_api.rb +154 -0
- data/lib/postboost/api/media_api.rb +836 -0
- data/lib/postboost/api/posts_api.rb +673 -0
- data/lib/postboost/api/receipts_api.rb +409 -0
- data/lib/postboost/api/subscriptions_api.rb +689 -0
- data/lib/postboost/api/tags_api.rb +367 -0
- data/lib/postboost/api/users_api.rb +406 -0
- data/lib/postboost/api/workspaces_api.rb +640 -0
- data/lib/postboost/api_client.rb +394 -0
- data/lib/postboost/api_error.rb +58 -0
- data/lib/postboost/configuration.rb +308 -0
- data/lib/postboost/models/account.rb +321 -0
- data/lib/postboost/models/add_generic_subscription_request.rb +274 -0
- data/lib/postboost/models/change_subscription_plan_request.rb +303 -0
- data/lib/postboost/models/checkout_subscription200_response.rb +214 -0
- data/lib/postboost/models/checkout_subscription_request.rb +280 -0
- data/lib/postboost/models/delete_media_bulk_request.rb +224 -0
- data/lib/postboost/models/delete_mode.rb +41 -0
- data/lib/postboost/models/delete_post_request.rb +249 -0
- data/lib/postboost/models/delete_posts_bulk_request.rb +269 -0
- data/lib/postboost/models/delete_receipts_bulk_request.rb +223 -0
- data/lib/postboost/models/delete_result.rb +232 -0
- data/lib/postboost/models/delete_user400_response.rb +223 -0
- data/lib/postboost/models/delete_users_bulk_request.rb +223 -0
- data/lib/postboost/models/delete_workspaces_bulk_request.rb +223 -0
- data/lib/postboost/models/get_remote_upload_status200_response.rb +258 -0
- data/lib/postboost/models/initiate_chunked_upload200_response.rb +232 -0
- data/lib/postboost/models/initiate_chunked_upload_request.rb +273 -0
- data/lib/postboost/models/initiate_remote_upload200_response.rb +105 -0
- data/lib/postboost/models/initiate_remote_upload200_response_one_of.rb +214 -0
- data/lib/postboost/models/initiate_remote_upload_request.rb +250 -0
- data/lib/postboost/models/list_accounts200_response.rb +216 -0
- data/lib/postboost/models/list_media200_response.rb +241 -0
- data/lib/postboost/models/list_posts200_response.rb +241 -0
- data/lib/postboost/models/list_receipts200_response.rb +241 -0
- data/lib/postboost/models/list_tags200_response.rb +216 -0
- data/lib/postboost/models/list_users200_response.rb +241 -0
- data/lib/postboost/models/list_workspaces200_response.rb +241 -0
- data/lib/postboost/models/media.rb +320 -0
- data/lib/postboost/models/pagination_meta.rb +223 -0
- data/lib/postboost/models/pagination_meta_links.rb +241 -0
- data/lib/postboost/models/pagination_meta_meta.rb +259 -0
- data/lib/postboost/models/post.rb +323 -0
- data/lib/postboost/models/post_content.rb +247 -0
- data/lib/postboost/models/post_input.rb +324 -0
- data/lib/postboost/models/post_status.rb +41 -0
- data/lib/postboost/models/post_version.rb +267 -0
- data/lib/postboost/models/receipt.rb +295 -0
- data/lib/postboost/models/receipt_input.rb +335 -0
- data/lib/postboost/models/receipt_update_input.rb +312 -0
- data/lib/postboost/models/remove_user_from_workspace_request.rb +221 -0
- data/lib/postboost/models/schedule_post_request.rb +221 -0
- data/lib/postboost/models/schedule_result.rb +223 -0
- data/lib/postboost/models/subscription.rb +299 -0
- data/lib/postboost/models/subscription_input.rb +285 -0
- data/lib/postboost/models/subscription_status.rb +44 -0
- data/lib/postboost/models/subscription_update_input.rb +279 -0
- data/lib/postboost/models/tag.rb +241 -0
- data/lib/postboost/models/tag_input.rb +237 -0
- data/lib/postboost/models/update_media_request.rb +222 -0
- data/lib/postboost/models/upload_chunk200_response.rb +215 -0
- data/lib/postboost/models/user.rb +259 -0
- data/lib/postboost/models/user_input.rb +304 -0
- data/lib/postboost/models/user_update_input.rb +272 -0
- data/lib/postboost/models/workspace.rb +293 -0
- data/lib/postboost/models/workspace_input.rb +315 -0
- data/lib/postboost/models/workspace_user_input.rb +303 -0
- data/lib/postboost/version.rb +15 -0
- data/lib/postboost.rb +103 -0
- data/postboost.gemspec +39 -0
- data/spec/api/accounts_api_spec.rb +60 -0
- data/spec/api/media_api_spec.rb +182 -0
- data/spec/api/posts_api_spec.rb +152 -0
- data/spec/api/receipts_api_spec.rb +103 -0
- data/spec/api/subscriptions_api_spec.rb +151 -0
- data/spec/api/tags_api_spec.rb +95 -0
- data/spec/api/users_api_spec.rb +102 -0
- data/spec/api/workspaces_api_spec.rb +142 -0
- data/spec/models/account_spec.rb +88 -0
- data/spec/models/add_generic_subscription_request_spec.rb +48 -0
- data/spec/models/change_subscription_plan_request_spec.rb +58 -0
- data/spec/models/checkout_subscription200_response_spec.rb +36 -0
- data/spec/models/checkout_subscription_request_spec.rb +52 -0
- data/spec/models/delete_media_bulk_request_spec.rb +36 -0
- data/spec/models/delete_mode_spec.rb +30 -0
- data/spec/models/delete_post_request_spec.rb +42 -0
- data/spec/models/delete_posts_bulk_request_spec.rb +48 -0
- data/spec/models/delete_receipts_bulk_request_spec.rb +36 -0
- data/spec/models/delete_result_spec.rb +48 -0
- data/spec/models/delete_user400_response_spec.rb +42 -0
- data/spec/models/delete_users_bulk_request_spec.rb +36 -0
- data/spec/models/delete_workspaces_bulk_request_spec.rb +36 -0
- data/spec/models/get_remote_upload_status200_response_spec.rb +46 -0
- data/spec/models/initiate_chunked_upload200_response_spec.rb +48 -0
- data/spec/models/initiate_chunked_upload_request_spec.rb +48 -0
- data/spec/models/initiate_remote_upload200_response_one_of_spec.rb +36 -0
- data/spec/models/initiate_remote_upload200_response_spec.rb +32 -0
- data/spec/models/initiate_remote_upload_request_spec.rb +42 -0
- data/spec/models/list_accounts200_response_spec.rb +36 -0
- data/spec/models/list_media200_response_spec.rb +48 -0
- data/spec/models/list_posts200_response_spec.rb +48 -0
- data/spec/models/list_receipts200_response_spec.rb +48 -0
- data/spec/models/list_tags200_response_spec.rb +36 -0
- data/spec/models/list_users200_response_spec.rb +48 -0
- data/spec/models/list_workspaces200_response_spec.rb +48 -0
- data/spec/models/media_spec.rb +88 -0
- data/spec/models/pagination_meta_links_spec.rb +54 -0
- data/spec/models/pagination_meta_meta_spec.rb +66 -0
- data/spec/models/pagination_meta_spec.rb +42 -0
- data/spec/models/post_content_spec.rb +54 -0
- data/spec/models/post_input_spec.rb +84 -0
- data/spec/models/post_spec.rb +90 -0
- data/spec/models/post_status_spec.rb +30 -0
- data/spec/models/post_version_spec.rb +54 -0
- data/spec/models/receipt_input_spec.rb +84 -0
- data/spec/models/receipt_spec.rb +90 -0
- data/spec/models/receipt_update_input_spec.rb +78 -0
- data/spec/models/remove_user_from_workspace_request_spec.rb +36 -0
- data/spec/models/schedule_post_request_spec.rb +36 -0
- data/spec/models/schedule_result_spec.rb +42 -0
- data/spec/models/subscription_input_spec.rb +54 -0
- data/spec/models/subscription_spec.rb +78 -0
- data/spec/models/subscription_status_spec.rb +30 -0
- data/spec/models/subscription_update_input_spec.rb +54 -0
- data/spec/models/tag_input_spec.rb +42 -0
- data/spec/models/tag_spec.rb +54 -0
- data/spec/models/update_media_request_spec.rb +36 -0
- data/spec/models/upload_chunk200_response_spec.rb +36 -0
- data/spec/models/user_input_spec.rb +60 -0
- data/spec/models/user_spec.rb +66 -0
- data/spec/models/user_update_input_spec.rb +60 -0
- data/spec/models/workspace_input_spec.rb +58 -0
- data/spec/models/workspace_spec.rb +70 -0
- data/spec/models/workspace_user_input_spec.rb +58 -0
- data/spec/spec_helper.rb +111 -0
- metadata +358 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PostBoost API
|
|
3
|
+
|
|
4
|
+
#The PostBoost REST API lets you publish, schedule, and analyze social media posts across 8+ platforms from a single integration. No OAuth apps to maintain — PostBoost handles platform authorization for you. ## Base URL All workspace-scoped endpoints are prefixed with `/{workspaceUuid}`. Panel/admin endpoints are prefixed with `/panel`. ## Authentication All requests require a Bearer token in the `Authorization` header. Generate tokens in your PostBoost dashboard under **Settings → Access Tokens**. ``` Authorization: Bearer YOUR_API_TOKEN ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: hi@postboost.co
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PostBoost
|
|
16
|
+
class SubscriptionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add generic subscription
|
|
23
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
24
|
+
# @param add_generic_subscription_request [AddGenericSubscriptionRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Object]
|
|
27
|
+
def add_generic_subscription(workspace_uuid, add_generic_subscription_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = add_generic_subscription_with_http_info(workspace_uuid, add_generic_subscription_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Add generic subscription
|
|
33
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
34
|
+
# @param add_generic_subscription_request [AddGenericSubscriptionRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
37
|
+
def add_generic_subscription_with_http_info(workspace_uuid, add_generic_subscription_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.add_generic_subscription ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
42
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.add_generic_subscription"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'add_generic_subscription_request' is set
|
|
46
|
+
if @api_client.config.client_side_validation && add_generic_subscription_request.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'add_generic_subscription_request' when calling SubscriptionsApi.add_generic_subscription"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/generic'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.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_generic_subscription_request)
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
73
|
+
|
|
74
|
+
# auth_names
|
|
75
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :"SubscriptionsApi.add_generic_subscription",
|
|
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: SubscriptionsApi#add_generic_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Cancel subscription
|
|
95
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Object]
|
|
98
|
+
def cancel_subscription(workspace_uuid, opts = {})
|
|
99
|
+
data, _status_code, _headers = cancel_subscription_with_http_info(workspace_uuid, opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Cancel subscription
|
|
104
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
107
|
+
def cancel_subscription_with_http_info(workspace_uuid, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.cancel_subscription ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
112
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.cancel_subscription"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/cancel'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
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
|
+
|
|
126
|
+
# form parameters
|
|
127
|
+
form_params = opts[:form_params] || {}
|
|
128
|
+
|
|
129
|
+
# http body (model)
|
|
130
|
+
post_body = opts[:debug_body]
|
|
131
|
+
|
|
132
|
+
# return_type
|
|
133
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
134
|
+
|
|
135
|
+
# auth_names
|
|
136
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
137
|
+
|
|
138
|
+
new_options = opts.merge(
|
|
139
|
+
:operation => :"SubscriptionsApi.cancel_subscription",
|
|
140
|
+
:header_params => header_params,
|
|
141
|
+
:query_params => query_params,
|
|
142
|
+
:form_params => form_params,
|
|
143
|
+
:body => post_body,
|
|
144
|
+
:auth_names => auth_names,
|
|
145
|
+
:return_type => return_type
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
149
|
+
if @api_client.config.debugging
|
|
150
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#cancel_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
151
|
+
end
|
|
152
|
+
return data, status_code, headers
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Change subscription plan
|
|
156
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
157
|
+
# @param change_subscription_plan_request [ChangeSubscriptionPlanRequest]
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [Object]
|
|
160
|
+
def change_subscription_plan(workspace_uuid, change_subscription_plan_request, opts = {})
|
|
161
|
+
data, _status_code, _headers = change_subscription_plan_with_http_info(workspace_uuid, change_subscription_plan_request, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Change subscription plan
|
|
166
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
167
|
+
# @param change_subscription_plan_request [ChangeSubscriptionPlanRequest]
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
170
|
+
def change_subscription_plan_with_http_info(workspace_uuid, change_subscription_plan_request, opts = {})
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.change_subscription_plan ...'
|
|
173
|
+
end
|
|
174
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
175
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
176
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.change_subscription_plan"
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'change_subscription_plan_request' is set
|
|
179
|
+
if @api_client.config.client_side_validation && change_subscription_plan_request.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'change_subscription_plan_request' when calling SubscriptionsApi.change_subscription_plan"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/change-plan'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
# HTTP header 'Accept' (if needed)
|
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
192
|
+
# HTTP header 'Content-Type'
|
|
193
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
194
|
+
if !content_type.nil?
|
|
195
|
+
header_params['Content-Type'] = content_type
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# form parameters
|
|
199
|
+
form_params = opts[:form_params] || {}
|
|
200
|
+
|
|
201
|
+
# http body (model)
|
|
202
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(change_subscription_plan_request)
|
|
203
|
+
|
|
204
|
+
# return_type
|
|
205
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
206
|
+
|
|
207
|
+
# auth_names
|
|
208
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
209
|
+
|
|
210
|
+
new_options = opts.merge(
|
|
211
|
+
:operation => :"SubscriptionsApi.change_subscription_plan",
|
|
212
|
+
:header_params => header_params,
|
|
213
|
+
:query_params => query_params,
|
|
214
|
+
:form_params => form_params,
|
|
215
|
+
:body => post_body,
|
|
216
|
+
:auth_names => auth_names,
|
|
217
|
+
:return_type => return_type
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
221
|
+
if @api_client.config.debugging
|
|
222
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#change_subscription_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
223
|
+
end
|
|
224
|
+
return data, status_code, headers
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# New subscription checkout
|
|
228
|
+
# Returns a Stripe Checkout URL for a new subscription.
|
|
229
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
230
|
+
# @param checkout_subscription_request [CheckoutSubscriptionRequest]
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @return [CheckoutSubscription200Response]
|
|
233
|
+
def checkout_subscription(workspace_uuid, checkout_subscription_request, opts = {})
|
|
234
|
+
data, _status_code, _headers = checkout_subscription_with_http_info(workspace_uuid, checkout_subscription_request, opts)
|
|
235
|
+
data
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# New subscription checkout
|
|
239
|
+
# Returns a Stripe Checkout URL for a new subscription.
|
|
240
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
241
|
+
# @param checkout_subscription_request [CheckoutSubscriptionRequest]
|
|
242
|
+
# @param [Hash] opts the optional parameters
|
|
243
|
+
# @return [Array<(CheckoutSubscription200Response, Integer, Hash)>] CheckoutSubscription200Response data, response status code and response headers
|
|
244
|
+
def checkout_subscription_with_http_info(workspace_uuid, checkout_subscription_request, opts = {})
|
|
245
|
+
if @api_client.config.debugging
|
|
246
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.checkout_subscription ...'
|
|
247
|
+
end
|
|
248
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
249
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
250
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.checkout_subscription"
|
|
251
|
+
end
|
|
252
|
+
# verify the required parameter 'checkout_subscription_request' is set
|
|
253
|
+
if @api_client.config.client_side_validation && checkout_subscription_request.nil?
|
|
254
|
+
fail ArgumentError, "Missing the required parameter 'checkout_subscription_request' when calling SubscriptionsApi.checkout_subscription"
|
|
255
|
+
end
|
|
256
|
+
# resource path
|
|
257
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/new'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
258
|
+
|
|
259
|
+
# query parameters
|
|
260
|
+
query_params = opts[:query_params] || {}
|
|
261
|
+
|
|
262
|
+
# header parameters
|
|
263
|
+
header_params = opts[:header_params] || {}
|
|
264
|
+
# HTTP header 'Accept' (if needed)
|
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
266
|
+
# HTTP header 'Content-Type'
|
|
267
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
268
|
+
if !content_type.nil?
|
|
269
|
+
header_params['Content-Type'] = content_type
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = opts[:form_params] || {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(checkout_subscription_request)
|
|
277
|
+
|
|
278
|
+
# return_type
|
|
279
|
+
return_type = opts[:debug_return_type] || 'CheckoutSubscription200Response'
|
|
280
|
+
|
|
281
|
+
# auth_names
|
|
282
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
283
|
+
|
|
284
|
+
new_options = opts.merge(
|
|
285
|
+
:operation => :"SubscriptionsApi.checkout_subscription",
|
|
286
|
+
:header_params => header_params,
|
|
287
|
+
:query_params => query_params,
|
|
288
|
+
:form_params => form_params,
|
|
289
|
+
:body => post_body,
|
|
290
|
+
:auth_names => auth_names,
|
|
291
|
+
:return_type => return_type
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#checkout_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
return data, status_code, headers
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Create subscription
|
|
302
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
303
|
+
# @param subscription_input [SubscriptionInput]
|
|
304
|
+
# @param [Hash] opts the optional parameters
|
|
305
|
+
# @return [Object]
|
|
306
|
+
def create_subscription(workspace_uuid, subscription_input, opts = {})
|
|
307
|
+
data, _status_code, _headers = create_subscription_with_http_info(workspace_uuid, subscription_input, opts)
|
|
308
|
+
data
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Create subscription
|
|
312
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
313
|
+
# @param subscription_input [SubscriptionInput]
|
|
314
|
+
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
316
|
+
def create_subscription_with_http_info(workspace_uuid, subscription_input, opts = {})
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_subscription ...'
|
|
319
|
+
end
|
|
320
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
321
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
322
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.create_subscription"
|
|
323
|
+
end
|
|
324
|
+
# verify the required parameter 'subscription_input' is set
|
|
325
|
+
if @api_client.config.client_side_validation && subscription_input.nil?
|
|
326
|
+
fail ArgumentError, "Missing the required parameter 'subscription_input' when calling SubscriptionsApi.create_subscription"
|
|
327
|
+
end
|
|
328
|
+
# resource path
|
|
329
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
330
|
+
|
|
331
|
+
# query parameters
|
|
332
|
+
query_params = opts[:query_params] || {}
|
|
333
|
+
|
|
334
|
+
# header parameters
|
|
335
|
+
header_params = opts[:header_params] || {}
|
|
336
|
+
# HTTP header 'Accept' (if needed)
|
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
338
|
+
# HTTP header 'Content-Type'
|
|
339
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
340
|
+
if !content_type.nil?
|
|
341
|
+
header_params['Content-Type'] = content_type
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# form parameters
|
|
345
|
+
form_params = opts[:form_params] || {}
|
|
346
|
+
|
|
347
|
+
# http body (model)
|
|
348
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_input)
|
|
349
|
+
|
|
350
|
+
# return_type
|
|
351
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
352
|
+
|
|
353
|
+
# auth_names
|
|
354
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
355
|
+
|
|
356
|
+
new_options = opts.merge(
|
|
357
|
+
:operation => :"SubscriptionsApi.create_subscription",
|
|
358
|
+
:header_params => header_params,
|
|
359
|
+
:query_params => query_params,
|
|
360
|
+
:form_params => form_params,
|
|
361
|
+
:body => post_body,
|
|
362
|
+
:auth_names => auth_names,
|
|
363
|
+
:return_type => return_type
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
369
|
+
end
|
|
370
|
+
return data, status_code, headers
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Delete subscription
|
|
374
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [Object]
|
|
377
|
+
def delete_subscription(workspace_uuid, opts = {})
|
|
378
|
+
data, _status_code, _headers = delete_subscription_with_http_info(workspace_uuid, opts)
|
|
379
|
+
data
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Delete subscription
|
|
383
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
384
|
+
# @param [Hash] opts the optional parameters
|
|
385
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
386
|
+
def delete_subscription_with_http_info(workspace_uuid, opts = {})
|
|
387
|
+
if @api_client.config.debugging
|
|
388
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.delete_subscription ...'
|
|
389
|
+
end
|
|
390
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
391
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
392
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.delete_subscription"
|
|
393
|
+
end
|
|
394
|
+
# resource path
|
|
395
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
396
|
+
|
|
397
|
+
# query parameters
|
|
398
|
+
query_params = opts[:query_params] || {}
|
|
399
|
+
|
|
400
|
+
# header parameters
|
|
401
|
+
header_params = opts[:header_params] || {}
|
|
402
|
+
# HTTP header 'Accept' (if needed)
|
|
403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
404
|
+
|
|
405
|
+
# form parameters
|
|
406
|
+
form_params = opts[:form_params] || {}
|
|
407
|
+
|
|
408
|
+
# http body (model)
|
|
409
|
+
post_body = opts[:debug_body]
|
|
410
|
+
|
|
411
|
+
# return_type
|
|
412
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
413
|
+
|
|
414
|
+
# auth_names
|
|
415
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
416
|
+
|
|
417
|
+
new_options = opts.merge(
|
|
418
|
+
:operation => :"SubscriptionsApi.delete_subscription",
|
|
419
|
+
:header_params => header_params,
|
|
420
|
+
:query_params => query_params,
|
|
421
|
+
:form_params => form_params,
|
|
422
|
+
:body => post_body,
|
|
423
|
+
:auth_names => auth_names,
|
|
424
|
+
:return_type => return_type
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
428
|
+
if @api_client.config.debugging
|
|
429
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
430
|
+
end
|
|
431
|
+
return data, status_code, headers
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Get subscription
|
|
435
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
436
|
+
# @param [Hash] opts the optional parameters
|
|
437
|
+
# @return [Subscription]
|
|
438
|
+
def get_subscription(workspace_uuid, opts = {})
|
|
439
|
+
data, _status_code, _headers = get_subscription_with_http_info(workspace_uuid, opts)
|
|
440
|
+
data
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Get subscription
|
|
444
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
445
|
+
# @param [Hash] opts the optional parameters
|
|
446
|
+
# @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
|
|
447
|
+
def get_subscription_with_http_info(workspace_uuid, opts = {})
|
|
448
|
+
if @api_client.config.debugging
|
|
449
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_subscription ...'
|
|
450
|
+
end
|
|
451
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
452
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
453
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.get_subscription"
|
|
454
|
+
end
|
|
455
|
+
# resource path
|
|
456
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
457
|
+
|
|
458
|
+
# query parameters
|
|
459
|
+
query_params = opts[:query_params] || {}
|
|
460
|
+
|
|
461
|
+
# header parameters
|
|
462
|
+
header_params = opts[:header_params] || {}
|
|
463
|
+
# HTTP header 'Accept' (if needed)
|
|
464
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
465
|
+
|
|
466
|
+
# form parameters
|
|
467
|
+
form_params = opts[:form_params] || {}
|
|
468
|
+
|
|
469
|
+
# http body (model)
|
|
470
|
+
post_body = opts[:debug_body]
|
|
471
|
+
|
|
472
|
+
# return_type
|
|
473
|
+
return_type = opts[:debug_return_type] || 'Subscription'
|
|
474
|
+
|
|
475
|
+
# auth_names
|
|
476
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
477
|
+
|
|
478
|
+
new_options = opts.merge(
|
|
479
|
+
:operation => :"SubscriptionsApi.get_subscription",
|
|
480
|
+
:header_params => header_params,
|
|
481
|
+
:query_params => query_params,
|
|
482
|
+
:form_params => form_params,
|
|
483
|
+
:body => post_body,
|
|
484
|
+
:auth_names => auth_names,
|
|
485
|
+
:return_type => return_type
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
489
|
+
if @api_client.config.debugging
|
|
490
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
491
|
+
end
|
|
492
|
+
return data, status_code, headers
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
# Remove generic subscription
|
|
496
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
497
|
+
# @param [Hash] opts the optional parameters
|
|
498
|
+
# @return [Object]
|
|
499
|
+
def remove_generic_subscription(workspace_uuid, opts = {})
|
|
500
|
+
data, _status_code, _headers = remove_generic_subscription_with_http_info(workspace_uuid, opts)
|
|
501
|
+
data
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Remove generic subscription
|
|
505
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
506
|
+
# @param [Hash] opts the optional parameters
|
|
507
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
508
|
+
def remove_generic_subscription_with_http_info(workspace_uuid, opts = {})
|
|
509
|
+
if @api_client.config.debugging
|
|
510
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.remove_generic_subscription ...'
|
|
511
|
+
end
|
|
512
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
513
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
514
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.remove_generic_subscription"
|
|
515
|
+
end
|
|
516
|
+
# resource path
|
|
517
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/generic'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
518
|
+
|
|
519
|
+
# query parameters
|
|
520
|
+
query_params = opts[:query_params] || {}
|
|
521
|
+
|
|
522
|
+
# header parameters
|
|
523
|
+
header_params = opts[:header_params] || {}
|
|
524
|
+
# HTTP header 'Accept' (if needed)
|
|
525
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
526
|
+
|
|
527
|
+
# form parameters
|
|
528
|
+
form_params = opts[:form_params] || {}
|
|
529
|
+
|
|
530
|
+
# http body (model)
|
|
531
|
+
post_body = opts[:debug_body]
|
|
532
|
+
|
|
533
|
+
# return_type
|
|
534
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
535
|
+
|
|
536
|
+
# auth_names
|
|
537
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
538
|
+
|
|
539
|
+
new_options = opts.merge(
|
|
540
|
+
:operation => :"SubscriptionsApi.remove_generic_subscription",
|
|
541
|
+
:header_params => header_params,
|
|
542
|
+
:query_params => query_params,
|
|
543
|
+
:form_params => form_params,
|
|
544
|
+
:body => post_body,
|
|
545
|
+
:auth_names => auth_names,
|
|
546
|
+
:return_type => return_type
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
550
|
+
if @api_client.config.debugging
|
|
551
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#remove_generic_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
552
|
+
end
|
|
553
|
+
return data, status_code, headers
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
# Resume subscription
|
|
557
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
558
|
+
# @param [Hash] opts the optional parameters
|
|
559
|
+
# @return [Object]
|
|
560
|
+
def resume_subscription(workspace_uuid, opts = {})
|
|
561
|
+
data, _status_code, _headers = resume_subscription_with_http_info(workspace_uuid, opts)
|
|
562
|
+
data
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# Resume subscription
|
|
566
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
567
|
+
# @param [Hash] opts the optional parameters
|
|
568
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
569
|
+
def resume_subscription_with_http_info(workspace_uuid, opts = {})
|
|
570
|
+
if @api_client.config.debugging
|
|
571
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.resume_subscription ...'
|
|
572
|
+
end
|
|
573
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
574
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
575
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.resume_subscription"
|
|
576
|
+
end
|
|
577
|
+
# resource path
|
|
578
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription/resume'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
579
|
+
|
|
580
|
+
# query parameters
|
|
581
|
+
query_params = opts[:query_params] || {}
|
|
582
|
+
|
|
583
|
+
# header parameters
|
|
584
|
+
header_params = opts[:header_params] || {}
|
|
585
|
+
# HTTP header 'Accept' (if needed)
|
|
586
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
587
|
+
|
|
588
|
+
# form parameters
|
|
589
|
+
form_params = opts[:form_params] || {}
|
|
590
|
+
|
|
591
|
+
# http body (model)
|
|
592
|
+
post_body = opts[:debug_body]
|
|
593
|
+
|
|
594
|
+
# return_type
|
|
595
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
596
|
+
|
|
597
|
+
# auth_names
|
|
598
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
599
|
+
|
|
600
|
+
new_options = opts.merge(
|
|
601
|
+
:operation => :"SubscriptionsApi.resume_subscription",
|
|
602
|
+
:header_params => header_params,
|
|
603
|
+
:query_params => query_params,
|
|
604
|
+
:form_params => form_params,
|
|
605
|
+
:body => post_body,
|
|
606
|
+
:auth_names => auth_names,
|
|
607
|
+
:return_type => return_type
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
611
|
+
if @api_client.config.debugging
|
|
612
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#resume_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
613
|
+
end
|
|
614
|
+
return data, status_code, headers
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Update subscription
|
|
618
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
619
|
+
# @param subscription_update_input [SubscriptionUpdateInput]
|
|
620
|
+
# @param [Hash] opts the optional parameters
|
|
621
|
+
# @return [Object]
|
|
622
|
+
def update_subscription(workspace_uuid, subscription_update_input, opts = {})
|
|
623
|
+
data, _status_code, _headers = update_subscription_with_http_info(workspace_uuid, subscription_update_input, opts)
|
|
624
|
+
data
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
# Update subscription
|
|
628
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
629
|
+
# @param subscription_update_input [SubscriptionUpdateInput]
|
|
630
|
+
# @param [Hash] opts the optional parameters
|
|
631
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
632
|
+
def update_subscription_with_http_info(workspace_uuid, subscription_update_input, opts = {})
|
|
633
|
+
if @api_client.config.debugging
|
|
634
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.update_subscription ...'
|
|
635
|
+
end
|
|
636
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
637
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
638
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling SubscriptionsApi.update_subscription"
|
|
639
|
+
end
|
|
640
|
+
# verify the required parameter 'subscription_update_input' is set
|
|
641
|
+
if @api_client.config.client_side_validation && subscription_update_input.nil?
|
|
642
|
+
fail ArgumentError, "Missing the required parameter 'subscription_update_input' when calling SubscriptionsApi.update_subscription"
|
|
643
|
+
end
|
|
644
|
+
# resource path
|
|
645
|
+
local_var_path = '/panel/workspaces/{workspaceUuid}/subscription'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
646
|
+
|
|
647
|
+
# query parameters
|
|
648
|
+
query_params = opts[:query_params] || {}
|
|
649
|
+
|
|
650
|
+
# header parameters
|
|
651
|
+
header_params = opts[:header_params] || {}
|
|
652
|
+
# HTTP header 'Accept' (if needed)
|
|
653
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
654
|
+
# HTTP header 'Content-Type'
|
|
655
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
656
|
+
if !content_type.nil?
|
|
657
|
+
header_params['Content-Type'] = content_type
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
# form parameters
|
|
661
|
+
form_params = opts[:form_params] || {}
|
|
662
|
+
|
|
663
|
+
# http body (model)
|
|
664
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_update_input)
|
|
665
|
+
|
|
666
|
+
# return_type
|
|
667
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
668
|
+
|
|
669
|
+
# auth_names
|
|
670
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
671
|
+
|
|
672
|
+
new_options = opts.merge(
|
|
673
|
+
:operation => :"SubscriptionsApi.update_subscription",
|
|
674
|
+
:header_params => header_params,
|
|
675
|
+
:query_params => query_params,
|
|
676
|
+
:form_params => form_params,
|
|
677
|
+
:body => post_body,
|
|
678
|
+
:auth_names => auth_names,
|
|
679
|
+
:return_type => return_type
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
683
|
+
if @api_client.config.debugging
|
|
684
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#update_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
685
|
+
end
|
|
686
|
+
return data, status_code, headers
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
end
|