Class: TogaiClient::SchedulesApi
- Inherits:
-
Object
- Object
- TogaiClient::SchedulesApi
- Defined in:
- lib/togai_client/api/schedules_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#bulk_edit_schedules(account_id, edit_account_schedule_request, opts = {}) ⇒ UpdatePricingScheduleResponse
Bulk edit schedules of an account Bulk edit schedules of an account.
-
#bulk_edit_schedules_with_http_info(account_id, edit_account_schedule_request, opts = {}) ⇒ Array<(UpdatePricingScheduleResponse, Integer, Hash)>
Bulk edit schedules of an account Bulk edit schedules of an account.
-
#bulk_rate_card_operations_on_schedule(schedule_id, bulk_rate_card_operations_request, opts = {}) ⇒ BulkRateCardOperationsResponse
Bulk rate card operations on a schedule Bulk rate card operations on a schedule.
-
#bulk_rate_card_operations_on_schedule_with_http_info(schedule_id, bulk_rate_card_operations_request, opts = {}) ⇒ Array<(BulkRateCardOperationsResponse, Integer, Hash)>
Bulk rate card operations on a schedule Bulk rate card operations on a schedule.
-
#discard_account_schedules(account_id, opts = {}) ⇒ BaseSuccessResponse
Discard schedules of an account Discard schedules of an account.
-
#discard_account_schedules_with_http_info(account_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Discard schedules of an account Discard schedules of an account.
-
#finalize_account_schedules(account_id, finalize_account_schedules, opts = {}) ⇒ SchedulesPaginatedResponse
Finalize schedules of an account Finalize schedules of an account.
-
#finalize_account_schedules_with_http_info(account_id, finalize_account_schedules, opts = {}) ⇒ Array<(SchedulesPaginatedResponse, Integer, Hash)>
Finalize schedules of an account Finalize schedules of an account.
-
#initialize(api_client = ApiClient.default) ⇒ SchedulesApi
constructor
A new instance of SchedulesApi.
-
#list_pricing_rules(schedule_id, mode, opts = {}) ⇒ PricingRulesPaginatedResponse
List pricing rules of a account schedule List pricing rules of a account schedule.
-
#list_pricing_rules_with_http_info(schedule_id, mode, opts = {}) ⇒ Array<(PricingRulesPaginatedResponse, Integer, Hash)>
List pricing rules of a account schedule List pricing rules of a account schedule.
-
#list_schedule_errors(schedule_id, opts = {}) ⇒ ValidatedEntityErrorsPaginatedResponse
Get list of errors of a acc schedule Get list of errors of a acc schedule.
-
#list_schedule_errors_with_http_info(schedule_id, opts = {}) ⇒ Array<(ValidatedEntityErrorsPaginatedResponse, Integer, Hash)>
Get list of errors of a acc schedule Get list of errors of a acc schedule.
-
#list_schedule_rate_cards(schedule_id, mode, opts = {}) ⇒ RateCardPaginatedResponse
List rate cards List rate cards.
-
#list_schedule_rate_cards_with_http_info(schedule_id, mode, opts = {}) ⇒ Array<(RateCardPaginatedResponse, Integer, Hash)>
List rate cards List rate cards.
-
#listaccount_schedules(account_id, mode, opts = {}) ⇒ SchedulesPaginatedResponse
List pricing schedules of an account List pricing schedules of an account.
-
#listaccount_schedules_with_http_info(account_id, mode, opts = {}) ⇒ Array<(SchedulesPaginatedResponse, Integer, Hash)>
List pricing schedules of an account List pricing schedules of an account.
-
#update_pricing_rules(schedule_id, update_pricing_rules_request, opts = {}) ⇒ PricingRulesPaginatedResponse
Update pricing rules of a account schedule Update pricing rules of a account schedule.
-
#update_pricing_rules_with_http_info(schedule_id, update_pricing_rules_request, opts = {}) ⇒ Array<(PricingRulesPaginatedResponse, Integer, Hash)>
Update pricing rules of a account schedule Update pricing rules of a account schedule.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SchedulesApi
Returns a new instance of SchedulesApi.
19 20 21 |
# File 'lib/togai_client/api/schedules_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/togai_client/api/schedules_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#bulk_edit_schedules(account_id, edit_account_schedule_request, opts = {}) ⇒ UpdatePricingScheduleResponse
Bulk edit schedules of an account Bulk edit schedules of an account
29 30 31 32 |
# File 'lib/togai_client/api/schedules_api.rb', line 29 def bulk_edit_schedules(account_id, edit_account_schedule_request, opts = {}) data, _status_code, _headers = bulk_edit_schedules_with_http_info(account_id, edit_account_schedule_request, opts) data end |
#bulk_edit_schedules_with_http_info(account_id, edit_account_schedule_request, opts = {}) ⇒ Array<(UpdatePricingScheduleResponse, Integer, Hash)>
Bulk edit schedules of an account Bulk edit schedules of an account
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/togai_client/api/schedules_api.rb', line 41 def bulk_edit_schedules_with_http_info(account_id, edit_account_schedule_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.bulk_edit_schedules ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling SchedulesApi.bulk_edit_schedules" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling SchedulesApi.bulk_edit_schedules, the character length must be smaller than or equal to 50.' end # verify the required parameter 'edit_account_schedule_request' is set if @api_client.config.client_side_validation && edit_account_schedule_request.nil? fail ArgumentError, "Missing the required parameter 'edit_account_schedule_request' when calling SchedulesApi.bulk_edit_schedules" end # resource path local_var_path = '/v2/accounts/{account_id}/edit_schedules'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'discard'] = opts[:'discard'] if !opts[:'discard'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_account_schedule_request) # return_type return_type = opts[:debug_return_type] || 'UpdatePricingScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.bulk_edit_schedules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#bulk_edit_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#bulk_rate_card_operations_on_schedule(schedule_id, bulk_rate_card_operations_request, opts = {}) ⇒ BulkRateCardOperationsResponse
Bulk rate card operations on a schedule Bulk rate card operations on a schedule
109 110 111 112 |
# File 'lib/togai_client/api/schedules_api.rb', line 109 def bulk_rate_card_operations_on_schedule(schedule_id, bulk_rate_card_operations_request, opts = {}) data, _status_code, _headers = bulk_rate_card_operations_on_schedule_with_http_info(schedule_id, bulk_rate_card_operations_request, opts) data end |
#bulk_rate_card_operations_on_schedule_with_http_info(schedule_id, bulk_rate_card_operations_request, opts = {}) ⇒ Array<(BulkRateCardOperationsResponse, Integer, Hash)>
Bulk rate card operations on a schedule Bulk rate card operations on a schedule
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/togai_client/api/schedules_api.rb', line 120 def bulk_rate_card_operations_on_schedule_with_http_info(schedule_id, bulk_rate_card_operations_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.bulk_rate_card_operations_on_schedule ...' end # verify the required parameter 'schedule_id' is set if @api_client.config.client_side_validation && schedule_id.nil? fail ArgumentError, "Missing the required parameter 'schedule_id' when calling SchedulesApi.bulk_rate_card_operations_on_schedule" end # verify the required parameter 'bulk_rate_card_operations_request' is set if @api_client.config.client_side_validation && bulk_rate_card_operations_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_rate_card_operations_request' when calling SchedulesApi.bulk_rate_card_operations_on_schedule" end # resource path local_var_path = '/v2/schedules/{schedule_id}/rate_cards'.sub('{' + 'schedule_id' + '}', CGI.escape(schedule_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_rate_card_operations_request) # return_type return_type = opts[:debug_return_type] || 'BulkRateCardOperationsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.bulk_rate_card_operations_on_schedule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#bulk_rate_card_operations_on_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#discard_account_schedules(account_id, opts = {}) ⇒ BaseSuccessResponse
Discard schedules of an account Discard schedules of an account
182 183 184 185 |
# File 'lib/togai_client/api/schedules_api.rb', line 182 def discard_account_schedules(account_id, opts = {}) data, _status_code, _headers = discard_account_schedules_with_http_info(account_id, opts) data end |
#discard_account_schedules_with_http_info(account_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Discard schedules of an account Discard schedules of an account
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/togai_client/api/schedules_api.rb', line 192 def discard_account_schedules_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.discard_account_schedules ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling SchedulesApi.discard_account_schedules" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling SchedulesApi.discard_account_schedules, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/v2/accounts/{account_id}/discard_schedules'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.discard_account_schedules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#discard_account_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#finalize_account_schedules(account_id, finalize_account_schedules, opts = {}) ⇒ SchedulesPaginatedResponse
Finalize schedules of an account Finalize schedules of an account
250 251 252 253 |
# File 'lib/togai_client/api/schedules_api.rb', line 250 def finalize_account_schedules(account_id, finalize_account_schedules, opts = {}) data, _status_code, _headers = finalize_account_schedules_with_http_info(account_id, finalize_account_schedules, opts) data end |
#finalize_account_schedules_with_http_info(account_id, finalize_account_schedules, opts = {}) ⇒ Array<(SchedulesPaginatedResponse, Integer, Hash)>
Finalize schedules of an account Finalize schedules of an account
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/togai_client/api/schedules_api.rb', line 261 def finalize_account_schedules_with_http_info(account_id, finalize_account_schedules, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.finalize_account_schedules ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling SchedulesApi.finalize_account_schedules" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling SchedulesApi.finalize_account_schedules, the character length must be smaller than or equal to 50.' end # verify the required parameter 'finalize_account_schedules' is set if @api_client.config.client_side_validation && finalize_account_schedules.nil? fail ArgumentError, "Missing the required parameter 'finalize_account_schedules' when calling SchedulesApi.finalize_account_schedules" end # resource path local_var_path = '/v2/accounts/{account_id}/finalize_schedules'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(finalize_account_schedules) # return_type return_type = opts[:debug_return_type] || 'SchedulesPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.finalize_account_schedules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#finalize_account_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_pricing_rules(schedule_id, mode, opts = {}) ⇒ PricingRulesPaginatedResponse
List pricing rules of a account schedule List pricing rules of a account schedule
328 329 330 331 |
# File 'lib/togai_client/api/schedules_api.rb', line 328 def list_pricing_rules(schedule_id, mode, opts = {}) data, _status_code, _headers = list_pricing_rules_with_http_info(schedule_id, mode, opts) data end |
#list_pricing_rules_with_http_info(schedule_id, mode, opts = {}) ⇒ Array<(PricingRulesPaginatedResponse, Integer, Hash)>
List pricing rules of a account schedule List pricing rules of a account schedule
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/togai_client/api/schedules_api.rb', line 339 def list_pricing_rules_with_http_info(schedule_id, mode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.list_pricing_rules ...' end # verify the required parameter 'schedule_id' is set if @api_client.config.client_side_validation && schedule_id.nil? fail ArgumentError, "Missing the required parameter 'schedule_id' when calling SchedulesApi.list_pricing_rules" end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling SchedulesApi.list_pricing_rules" end # resource path local_var_path = '/v2/schedules/{schedule_id}/pricing_rules'.sub('{' + 'schedule_id' + '}', CGI.escape(schedule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mode'] = mode # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PricingRulesPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.list_pricing_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#list_pricing_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_schedule_errors(schedule_id, opts = {}) ⇒ ValidatedEntityErrorsPaginatedResponse
Get list of errors of a acc schedule Get list of errors of a acc schedule
397 398 399 400 |
# File 'lib/togai_client/api/schedules_api.rb', line 397 def list_schedule_errors(schedule_id, opts = {}) data, _status_code, _headers = list_schedule_errors_with_http_info(schedule_id, opts) data end |
#list_schedule_errors_with_http_info(schedule_id, opts = {}) ⇒ Array<(ValidatedEntityErrorsPaginatedResponse, Integer, Hash)>
Get list of errors of a acc schedule Get list of errors of a acc schedule
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/togai_client/api/schedules_api.rb', line 407 def list_schedule_errors_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.list_schedule_errors ...' end # verify the required parameter 'schedule_id' is set if @api_client.config.client_side_validation && schedule_id.nil? fail ArgumentError, "Missing the required parameter 'schedule_id' when calling SchedulesApi.list_schedule_errors" end # resource path local_var_path = '/v2/schedules/{schedule_id}/errors'.sub('{' + 'schedule_id' + '}', CGI.escape(schedule_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ValidatedEntityErrorsPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.list_schedule_errors", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#list_schedule_errors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_schedule_rate_cards(schedule_id, mode, opts = {}) ⇒ RateCardPaginatedResponse
List rate cards List rate cards
463 464 465 466 |
# File 'lib/togai_client/api/schedules_api.rb', line 463 def list_schedule_rate_cards(schedule_id, mode, opts = {}) data, _status_code, _headers = list_schedule_rate_cards_with_http_info(schedule_id, mode, opts) data end |
#list_schedule_rate_cards_with_http_info(schedule_id, mode, opts = {}) ⇒ Array<(RateCardPaginatedResponse, Integer, Hash)>
List rate cards List rate cards
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/togai_client/api/schedules_api.rb', line 476 def list_schedule_rate_cards_with_http_info(schedule_id, mode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.list_schedule_rate_cards ...' end # verify the required parameter 'schedule_id' is set if @api_client.config.client_side_validation && schedule_id.nil? fail ArgumentError, "Missing the required parameter 'schedule_id' when calling SchedulesApi.list_schedule_rate_cards" end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling SchedulesApi.list_schedule_rate_cards" end # resource path local_var_path = '/v2/schedules/{schedule_id}/rate_cards'.sub('{' + 'schedule_id' + '}', CGI.escape(schedule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mode'] = mode query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RateCardPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.list_schedule_rate_cards", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#list_schedule_rate_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#listaccount_schedules(account_id, mode, opts = {}) ⇒ SchedulesPaginatedResponse
List pricing schedules of an account List pricing schedules of an account
539 540 541 542 |
# File 'lib/togai_client/api/schedules_api.rb', line 539 def listaccount_schedules(account_id, mode, opts = {}) data, _status_code, _headers = listaccount_schedules_with_http_info(account_id, mode, opts) data end |
#listaccount_schedules_with_http_info(account_id, mode, opts = {}) ⇒ Array<(SchedulesPaginatedResponse, Integer, Hash)>
List pricing schedules of an account List pricing schedules of an account
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/togai_client/api/schedules_api.rb', line 552 def listaccount_schedules_with_http_info(account_id, mode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.listaccount_schedules ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling SchedulesApi.listaccount_schedules" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling SchedulesApi.listaccount_schedules, the character length must be smaller than or equal to 50.' end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling SchedulesApi.listaccount_schedules" end # resource path local_var_path = '/v2/accounts/{account_id}/schedules'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mode'] = mode query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SchedulesPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.listaccount_schedules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#listaccount_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_pricing_rules(schedule_id, update_pricing_rules_request, opts = {}) ⇒ PricingRulesPaginatedResponse
Update pricing rules of a account schedule Update pricing rules of a account schedule
617 618 619 620 |
# File 'lib/togai_client/api/schedules_api.rb', line 617 def update_pricing_rules(schedule_id, update_pricing_rules_request, opts = {}) data, _status_code, _headers = update_pricing_rules_with_http_info(schedule_id, update_pricing_rules_request, opts) data end |
#update_pricing_rules_with_http_info(schedule_id, update_pricing_rules_request, opts = {}) ⇒ Array<(PricingRulesPaginatedResponse, Integer, Hash)>
Update pricing rules of a account schedule Update pricing rules of a account schedule
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
# File 'lib/togai_client/api/schedules_api.rb', line 628 def update_pricing_rules_with_http_info(schedule_id, update_pricing_rules_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SchedulesApi.update_pricing_rules ...' end # verify the required parameter 'schedule_id' is set if @api_client.config.client_side_validation && schedule_id.nil? fail ArgumentError, "Missing the required parameter 'schedule_id' when calling SchedulesApi.update_pricing_rules" end # verify the required parameter 'update_pricing_rules_request' is set if @api_client.config.client_side_validation && update_pricing_rules_request.nil? fail ArgumentError, "Missing the required parameter 'update_pricing_rules_request' when calling SchedulesApi.update_pricing_rules" end # resource path local_var_path = '/v2/schedules/{schedule_id}/pricing_rules'.sub('{' + 'schedule_id' + '}', CGI.escape(schedule_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_pricing_rules_request) # return_type return_type = opts[:debug_return_type] || 'PricingRulesPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"SchedulesApi.update_pricing_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SchedulesApi#update_pricing_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |