togai_client 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/README.md +61 -0
- data/Rakefile +10 -0
- data/docs/Account.md +24 -0
- data/docs/AccountAliases.md +20 -0
- data/docs/AccountPaginatedResponse.md +22 -0
- data/docs/AccountsApi.md +595 -0
- data/docs/AddAccountAliasesRequest.md +18 -0
- data/docs/AssociatePricePlanRequest.md +24 -0
- data/docs/AssociatePricePlanResponse.md +22 -0
- data/docs/BaseSuccessResponse.md +18 -0
- data/docs/BundleStrategy.md +24 -0
- data/docs/BundleStrategyUsageMetersValue.md +18 -0
- data/docs/Computation.md +31 -0
- data/docs/CreateAccountRequest.md +22 -0
- data/docs/CreateCustomerRequest.md +26 -0
- data/docs/CreateCustomerResponse.md +26 -0
- data/docs/CreateEventSchemaRequest.md +24 -0
- data/docs/CreatePricePlanRequest.md +24 -0
- data/docs/CreateUsageMeterRequest.md +26 -0
- data/docs/Customer.md +30 -0
- data/docs/CustomerPaginatedResponse.md +22 -0
- data/docs/CustomersApi.md +363 -0
- data/docs/DimensionsSchema.md +18 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/Event.md +28 -0
- data/docs/EventAttribute.md +22 -0
- data/docs/EventAttributeSchema.md +20 -0
- data/docs/EventIngestionApi.md +146 -0
- data/docs/EventManagementApi.md +159 -0
- data/docs/EventPipelineInfo.md +26 -0
- data/docs/EventPipelineInfoAccount.md +20 -0
- data/docs/EventPipelineInfoCustomer.md +20 -0
- data/docs/EventPipelineInfoEventSchema.md +20 -0
- data/docs/EventPipelineInfoPricePlansInner.md +26 -0
- data/docs/EventPipelineInfoUsageMetersInner.md +24 -0
- data/docs/EventSchema.md +32 -0
- data/docs/EventSchemaListData.md +34 -0
- data/docs/EventSchemaListDataAllOf.md +18 -0
- data/docs/EventSchemaListPaginatedResponse.md +22 -0
- data/docs/EventSchemaVersionsResponse.md +18 -0
- data/docs/EventSchemasApi.md +581 -0
- data/docs/EventWithStatus.md +20 -0
- data/docs/EventWithStatusAndEventPipelineInfo.md +22 -0
- data/docs/EventWithStatusAndEventPipelineInfoAllOf.md +18 -0
- data/docs/GetEventResponse.md +18 -0
- data/docs/GetEventsResponse.md +20 -0
- data/docs/GetMetricsRequest.md +22 -0
- data/docs/GetMetricsResponse.md +18 -0
- data/docs/IngestBatchEventRequest.md +18 -0
- data/docs/IngestBatchEventResponse.md +18 -0
- data/docs/IngestError.md +20 -0
- data/docs/IngestEventRequest.md +18 -0
- data/docs/IngestEventResponse.md +18 -0
- data/docs/IngestionStatus.md +20 -0
- data/docs/MetricDataPoints.md +22 -0
- data/docs/MetricDataPointsGroupedBy.md +20 -0
- data/docs/MetricName.md +15 -0
- data/docs/MetricQuery.md +26 -0
- data/docs/MetricQueryFilterEntry.md +20 -0
- data/docs/MetricQueryResponse.md +22 -0
- data/docs/MetricsApi.md +79 -0
- data/docs/PaginationOptions.md +20 -0
- data/docs/PlanOverride.md +24 -0
- data/docs/PricePlan.md +26 -0
- data/docs/PricePlanListData.md +32 -0
- data/docs/PricePlanPaginatedResponse.md +22 -0
- data/docs/PricePlansApi.md +363 -0
- data/docs/PricingCycle.md +24 -0
- data/docs/PricingCycleStartOffset.md +20 -0
- data/docs/PricingSchedule.md +22 -0
- data/docs/RateCard.md +22 -0
- data/docs/RateCardBundle.md +22 -0
- data/docs/RateCardUsageValue.md +24 -0
- data/docs/RemoveAccountAliasesRequest.md +18 -0
- data/docs/SignupRequest.md +22 -0
- data/docs/SignupResponse.md +20 -0
- data/docs/StatusResponse.md +24 -0
- data/docs/StatusResponseHeaders.md +18 -0
- data/docs/UpdateAccountRequest.md +18 -0
- data/docs/UpdateCustomerRequest.md +22 -0
- data/docs/UpdateEventSchemaRequest.md +22 -0
- data/docs/UpdatePricePlanRequest.md +22 -0
- data/docs/UpdateUsageMeterRequest.md +24 -0
- data/docs/UsageMeter.md +34 -0
- data/docs/UsageMeterPaginatedResponse.md +22 -0
- data/docs/UsageMetersApi.md +521 -0
- data/docs/UsageStrategy.md +22 -0
- data/docs/UserDetails.md +26 -0
- data/git_push.sh +57 -0
- data/lib/togai_client/api/accounts_api.rb +679 -0
- data/lib/togai_client/api/customers_api.rb +365 -0
- data/lib/togai_client/api/event_ingestion_api.rb +158 -0
- data/lib/togai_client/api/event_management_api.rb +164 -0
- data/lib/togai_client/api/event_schemas_api.rb +579 -0
- data/lib/togai_client/api/metrics_api.rb +86 -0
- data/lib/togai_client/api/price_plans_api.rb +365 -0
- data/lib/togai_client/api/usage_meters_api.rb +572 -0
- data/lib/togai_client/api_client.rb +392 -0
- data/lib/togai_client/api_error.rb +57 -0
- data/lib/togai_client/configuration.rb +287 -0
- data/lib/togai_client/models/account.rb +373 -0
- data/lib/togai_client/models/account_aliases.rb +277 -0
- data/lib/togai_client/models/account_paginated_response.rb +239 -0
- data/lib/togai_client/models/add_account_aliases_request.rb +247 -0
- data/lib/togai_client/models/associate_price_plan_request.rb +274 -0
- data/lib/togai_client/models/associate_price_plan_response.rb +275 -0
- data/lib/togai_client/models/base_success_response.rb +224 -0
- data/lib/togai_client/models/bundle_strategy.rb +325 -0
- data/lib/togai_client/models/bundle_strategy_usage_meters_value.rb +224 -0
- data/lib/togai_client/models/computation.rb +294 -0
- data/lib/togai_client/models/create_account_request.rb +324 -0
- data/lib/togai_client/models/create_customer_request.rb +374 -0
- data/lib/togai_client/models/create_customer_response.rb +373 -0
- data/lib/togai_client/models/create_event_schema_request.rb +351 -0
- data/lib/togai_client/models/create_price_plan_request.rb +298 -0
- data/lib/togai_client/models/create_usage_meter_request.rb +368 -0
- data/lib/togai_client/models/customer.rb +442 -0
- data/lib/togai_client/models/customer_paginated_response.rb +239 -0
- data/lib/togai_client/models/dimensions_schema.rb +256 -0
- data/lib/togai_client/models/error_response.rb +244 -0
- data/lib/togai_client/models/event.rb +379 -0
- data/lib/togai_client/models/event_attribute.rb +304 -0
- data/lib/togai_client/models/event_attribute_schema.rb +281 -0
- data/lib/togai_client/models/event_pipeline_info.rb +260 -0
- data/lib/togai_client/models/event_pipeline_info_account.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_customer.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_event_schema.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_price_plans_inner.rb +283 -0
- data/lib/togai_client/models/event_pipeline_info_usage_meters_inner.rb +295 -0
- data/lib/togai_client/models/event_schema.rb +438 -0
- data/lib/togai_client/models/event_schema_list_data.rb +456 -0
- data/lib/togai_client/models/event_schema_list_data_all_of.rb +221 -0
- data/lib/togai_client/models/event_schema_list_paginated_response.rb +239 -0
- data/lib/togai_client/models/event_schema_versions_response.rb +227 -0
- data/lib/togai_client/models/event_with_status.rb +239 -0
- data/lib/togai_client/models/event_with_status_and_event_pipeline_info.rb +255 -0
- data/lib/togai_client/models/event_with_status_and_event_pipeline_info_all_of.rb +219 -0
- data/lib/togai_client/models/get_event_response.rb +222 -0
- data/lib/togai_client/models/get_events_response.rb +279 -0
- data/lib/togai_client/models/get_metrics_request.rb +265 -0
- data/lib/togai_client/models/get_metrics_response.rb +227 -0
- data/lib/togai_client/models/ingest_batch_event_request.rb +255 -0
- data/lib/togai_client/models/ingest_batch_event_response.rb +245 -0
- data/lib/togai_client/models/ingest_error.rb +229 -0
- data/lib/togai_client/models/ingest_event_request.rb +220 -0
- data/lib/togai_client/models/ingest_event_response.rb +244 -0
- data/lib/togai_client/models/ingestion_status.rb +284 -0
- data/lib/togai_client/models/metric_data_points.rb +289 -0
- data/lib/togai_client/models/metric_data_points_grouped_by.rb +238 -0
- data/lib/togai_client/models/metric_name.rb +38 -0
- data/lib/togai_client/models/metric_query.rb +331 -0
- data/lib/togai_client/models/metric_query_filter_entry.rb +241 -0
- data/lib/togai_client/models/metric_query_response.rb +255 -0
- data/lib/togai_client/models/pagination_options.rb +262 -0
- data/lib/togai_client/models/plan_override.rb +262 -0
- data/lib/togai_client/models/price_plan.rb +349 -0
- data/lib/togai_client/models/price_plan_list_data.rb +393 -0
- data/lib/togai_client/models/price_plan_paginated_response.rb +239 -0
- data/lib/togai_client/models/pricing_cycle.rb +313 -0
- data/lib/togai_client/models/pricing_cycle_start_offset.rb +241 -0
- data/lib/togai_client/models/pricing_schedule.rb +248 -0
- data/lib/togai_client/models/rate_card.rb +279 -0
- data/lib/togai_client/models/rate_card_bundle.rb +328 -0
- data/lib/togai_client/models/rate_card_usage_value.rb +343 -0
- data/lib/togai_client/models/remove_account_aliases_request.rb +247 -0
- data/lib/togai_client/models/signup_request.rb +293 -0
- data/lib/togai_client/models/signup_response.rb +260 -0
- data/lib/togai_client/models/status_response.rb +246 -0
- data/lib/togai_client/models/status_response_headers.rb +219 -0
- data/lib/togai_client/models/update_account_request.rb +245 -0
- data/lib/togai_client/models/update_customer_request.rb +304 -0
- data/lib/togai_client/models/update_event_schema_request.rb +306 -0
- data/lib/togai_client/models/update_price_plan_request.rb +254 -0
- data/lib/togai_client/models/update_usage_meter_request.rb +323 -0
- data/lib/togai_client/models/usage_meter.rb +440 -0
- data/lib/togai_client/models/usage_meter_paginated_response.rb +239 -0
- data/lib/togai_client/models/usage_strategy.rb +281 -0
- data/lib/togai_client/models/user_details.rb +380 -0
- data/lib/togai_client/version.rb +15 -0
- data/lib/togai_client.rb +125 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- data/togai_client.gemspec +38 -0
- metadata +271 -0
@@ -0,0 +1,365 @@
|
|
1
|
+
=begin
|
2
|
+
#Togai Apis
|
3
|
+
|
4
|
+
#APIs for Togai App
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: engg@togai.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module TogaiClient
|
16
|
+
class PricePlansApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Activate a price plan
|
23
|
+
# Activate a price plan
|
24
|
+
# @param price_plan_name [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [PricePlan]
|
27
|
+
def activate_price_plan(price_plan_name, opts = {})
|
28
|
+
data, _status_code, _headers = activate_price_plan_with_http_info(price_plan_name, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Activate a price plan
|
33
|
+
# Activate a price plan
|
34
|
+
# @param price_plan_name [String]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(PricePlan, Integer, Hash)>] PricePlan data, response status code and response headers
|
37
|
+
def activate_price_plan_with_http_info(price_plan_name, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PricePlansApi.activate_price_plan ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'price_plan_name' is set
|
42
|
+
if @api_client.config.client_side_validation && price_plan_name.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'price_plan_name' when calling PricePlansApi.activate_price_plan"
|
44
|
+
end
|
45
|
+
if @api_client.config.client_side_validation && price_plan_name.to_s.length > 50
|
46
|
+
fail ArgumentError, 'invalid value for "price_plan_name" when calling PricePlansApi.activate_price_plan, the character length must be smaller than or equal to 50.'
|
47
|
+
end
|
48
|
+
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/price_plans/{price_plan_name}/activate'.sub('{' + 'price_plan_name' + '}', CGI.escape(price_plan_name.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'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:debug_body]
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:debug_return_type] || 'PricePlan'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"PricePlansApi.activate_price_plan",
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: PricePlansApi#activate_price_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Create a price plan
|
90
|
+
# Create a price plan
|
91
|
+
# @param create_price_plan_request [CreatePricePlanRequest] Payload to create price plan
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [PricePlan]
|
94
|
+
def create_price_plan(create_price_plan_request, opts = {})
|
95
|
+
data, _status_code, _headers = create_price_plan_with_http_info(create_price_plan_request, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Create a price plan
|
100
|
+
# Create a price plan
|
101
|
+
# @param create_price_plan_request [CreatePricePlanRequest] Payload to create price plan
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(PricePlan, Integer, Hash)>] PricePlan data, response status code and response headers
|
104
|
+
def create_price_plan_with_http_info(create_price_plan_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: PricePlansApi.create_price_plan ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'create_price_plan_request' is set
|
109
|
+
if @api_client.config.client_side_validation && create_price_plan_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'create_price_plan_request' when calling PricePlansApi.create_price_plan"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/price_plans'
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = opts[:query_params] || {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
124
|
+
if !content_type.nil?
|
125
|
+
header_params['Content-Type'] = content_type
|
126
|
+
end
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_price_plan_request)
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'PricePlan'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"PricePlansApi.create_price_plan",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: PricePlansApi#create_price_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Get a price plan
|
158
|
+
# Get a price plan
|
159
|
+
# @param price_plan_name [String]
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [PricePlan]
|
162
|
+
def get_price_plan(price_plan_name, opts = {})
|
163
|
+
data, _status_code, _headers = get_price_plan_with_http_info(price_plan_name, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# Get a price plan
|
168
|
+
# Get a price plan
|
169
|
+
# @param price_plan_name [String]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @return [Array<(PricePlan, Integer, Hash)>] PricePlan data, response status code and response headers
|
172
|
+
def get_price_plan_with_http_info(price_plan_name, opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: PricePlansApi.get_price_plan ...'
|
175
|
+
end
|
176
|
+
# verify the required parameter 'price_plan_name' is set
|
177
|
+
if @api_client.config.client_side_validation && price_plan_name.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'price_plan_name' when calling PricePlansApi.get_price_plan"
|
179
|
+
end
|
180
|
+
if @api_client.config.client_side_validation && price_plan_name.to_s.length > 50
|
181
|
+
fail ArgumentError, 'invalid value for "price_plan_name" when calling PricePlansApi.get_price_plan, the character length must be smaller than or equal to 50.'
|
182
|
+
end
|
183
|
+
|
184
|
+
# resource path
|
185
|
+
local_var_path = '/price_plans/{price_plan_name}'.sub('{' + 'price_plan_name' + '}', CGI.escape(price_plan_name.to_s))
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = opts[:query_params] || {}
|
189
|
+
|
190
|
+
# header parameters
|
191
|
+
header_params = opts[:header_params] || {}
|
192
|
+
# HTTP header 'Accept' (if needed)
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
194
|
+
|
195
|
+
# form parameters
|
196
|
+
form_params = opts[:form_params] || {}
|
197
|
+
|
198
|
+
# http body (model)
|
199
|
+
post_body = opts[:debug_body]
|
200
|
+
|
201
|
+
# return_type
|
202
|
+
return_type = opts[:debug_return_type] || 'PricePlan'
|
203
|
+
|
204
|
+
# auth_names
|
205
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
206
|
+
|
207
|
+
new_options = opts.merge(
|
208
|
+
:operation => :"PricePlansApi.get_price_plan",
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names,
|
214
|
+
:return_type => return_type
|
215
|
+
)
|
216
|
+
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug "API called: PricePlansApi#get_price_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
220
|
+
end
|
221
|
+
return data, status_code, headers
|
222
|
+
end
|
223
|
+
|
224
|
+
# List price plans
|
225
|
+
# List price plans with pagination and sort
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @option opts [String] :next_token
|
228
|
+
# @option opts [String] :page_size
|
229
|
+
# @return [PricePlanPaginatedResponse]
|
230
|
+
def get_price_plans(opts = {})
|
231
|
+
data, _status_code, _headers = get_price_plans_with_http_info(opts)
|
232
|
+
data
|
233
|
+
end
|
234
|
+
|
235
|
+
# List price plans
|
236
|
+
# List price plans with pagination and sort
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [String] :next_token
|
239
|
+
# @option opts [String] :page_size
|
240
|
+
# @return [Array<(PricePlanPaginatedResponse, Integer, Hash)>] PricePlanPaginatedResponse data, response status code and response headers
|
241
|
+
def get_price_plans_with_http_info(opts = {})
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug 'Calling API: PricePlansApi.get_price_plans ...'
|
244
|
+
end
|
245
|
+
# resource path
|
246
|
+
local_var_path = '/price_plans'
|
247
|
+
|
248
|
+
# query parameters
|
249
|
+
query_params = opts[:query_params] || {}
|
250
|
+
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
251
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
252
|
+
|
253
|
+
# header parameters
|
254
|
+
header_params = opts[:header_params] || {}
|
255
|
+
# HTTP header 'Accept' (if needed)
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
257
|
+
|
258
|
+
# form parameters
|
259
|
+
form_params = opts[:form_params] || {}
|
260
|
+
|
261
|
+
# http body (model)
|
262
|
+
post_body = opts[:debug_body]
|
263
|
+
|
264
|
+
# return_type
|
265
|
+
return_type = opts[:debug_return_type] || 'PricePlanPaginatedResponse'
|
266
|
+
|
267
|
+
# auth_names
|
268
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
269
|
+
|
270
|
+
new_options = opts.merge(
|
271
|
+
:operation => :"PricePlansApi.get_price_plans",
|
272
|
+
:header_params => header_params,
|
273
|
+
:query_params => query_params,
|
274
|
+
:form_params => form_params,
|
275
|
+
:body => post_body,
|
276
|
+
:auth_names => auth_names,
|
277
|
+
:return_type => return_type
|
278
|
+
)
|
279
|
+
|
280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug "API called: PricePlansApi#get_price_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
283
|
+
end
|
284
|
+
return data, status_code, headers
|
285
|
+
end
|
286
|
+
|
287
|
+
# Update a price plan
|
288
|
+
# Update a price plan
|
289
|
+
# @param price_plan_name [String]
|
290
|
+
# @param update_price_plan_request [UpdatePricePlanRequest] Payload to update price plan
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [PricePlan]
|
293
|
+
def update_price_plan(price_plan_name, update_price_plan_request, opts = {})
|
294
|
+
data, _status_code, _headers = update_price_plan_with_http_info(price_plan_name, update_price_plan_request, opts)
|
295
|
+
data
|
296
|
+
end
|
297
|
+
|
298
|
+
# Update a price plan
|
299
|
+
# Update a price plan
|
300
|
+
# @param price_plan_name [String]
|
301
|
+
# @param update_price_plan_request [UpdatePricePlanRequest] Payload to update price plan
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @return [Array<(PricePlan, Integer, Hash)>] PricePlan data, response status code and response headers
|
304
|
+
def update_price_plan_with_http_info(price_plan_name, update_price_plan_request, opts = {})
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug 'Calling API: PricePlansApi.update_price_plan ...'
|
307
|
+
end
|
308
|
+
# verify the required parameter 'price_plan_name' is set
|
309
|
+
if @api_client.config.client_side_validation && price_plan_name.nil?
|
310
|
+
fail ArgumentError, "Missing the required parameter 'price_plan_name' when calling PricePlansApi.update_price_plan"
|
311
|
+
end
|
312
|
+
if @api_client.config.client_side_validation && price_plan_name.to_s.length > 50
|
313
|
+
fail ArgumentError, 'invalid value for "price_plan_name" when calling PricePlansApi.update_price_plan, the character length must be smaller than or equal to 50.'
|
314
|
+
end
|
315
|
+
|
316
|
+
# verify the required parameter 'update_price_plan_request' is set
|
317
|
+
if @api_client.config.client_side_validation && update_price_plan_request.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'update_price_plan_request' when calling PricePlansApi.update_price_plan"
|
319
|
+
end
|
320
|
+
# resource path
|
321
|
+
local_var_path = '/price_plans/{price_plan_name}'.sub('{' + 'price_plan_name' + '}', CGI.escape(price_plan_name.to_s))
|
322
|
+
|
323
|
+
# query parameters
|
324
|
+
query_params = opts[:query_params] || {}
|
325
|
+
|
326
|
+
# header parameters
|
327
|
+
header_params = opts[:header_params] || {}
|
328
|
+
# HTTP header 'Accept' (if needed)
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
330
|
+
# HTTP header 'Content-Type'
|
331
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
332
|
+
if !content_type.nil?
|
333
|
+
header_params['Content-Type'] = content_type
|
334
|
+
end
|
335
|
+
|
336
|
+
# form parameters
|
337
|
+
form_params = opts[:form_params] || {}
|
338
|
+
|
339
|
+
# http body (model)
|
340
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_price_plan_request)
|
341
|
+
|
342
|
+
# return_type
|
343
|
+
return_type = opts[:debug_return_type] || 'PricePlan'
|
344
|
+
|
345
|
+
# auth_names
|
346
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
347
|
+
|
348
|
+
new_options = opts.merge(
|
349
|
+
:operation => :"PricePlansApi.update_price_plan",
|
350
|
+
:header_params => header_params,
|
351
|
+
:query_params => query_params,
|
352
|
+
:form_params => form_params,
|
353
|
+
:body => post_body,
|
354
|
+
:auth_names => auth_names,
|
355
|
+
:return_type => return_type
|
356
|
+
)
|
357
|
+
|
358
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
359
|
+
if @api_client.config.debugging
|
360
|
+
@api_client.config.logger.debug "API called: PricePlansApi#update_price_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
361
|
+
end
|
362
|
+
return data, status_code, headers
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|