Class: NewStoreApi::ProviderRatesController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::ProviderRatesController
- Defined in:
- lib/new_store_api/controllers/provider_rates_controller.rb
Overview
ProviderRatesController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#destroy_provider_rate(provider_rate_id) ⇒ Object
TODO: type endpoint description here description here.
-
#list_provider_rates ⇒ ShowProviderRatesSchema
TODO: type endpoint description here.
-
#replace_provider_rate(provider_rate_id, body) ⇒ ProviderRateSchema
TODO: type endpoint description here description here description here.
-
#replace_provider_rate_priorities(body) ⇒ Hash[String, Mixed]
TODO: type endpoint description here description here.
-
#show_provider_rate(provider_rate_id) ⇒ ProviderRateSchema
TODO: type endpoint description here description here.
-
#show_provider_rate_priorities ⇒ Hash[String, Mixed]
TODO: type endpoint description here.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from NewStoreApi::BaseController
Instance Method Details
#destroy_provider_rate(provider_rate_id) ⇒ Object
TODO: type endpoint description here description here
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 61 def destroy_provider_rate(provider_rate_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/fulfillment/provider-rates/{provider_rate_id}', Server::API) .template_param(new_parameter(provider_rate_id, key: 'provider_rate_id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:json_deserialize))) .execute end |
#list_provider_rates ⇒ ShowProviderRatesSchema
TODO: type endpoint description here
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 44 def list_provider_rates @api_call .request(new_request_builder(HttpMethodEnum::GET, '/fulfillment/provider-rates', Server::API) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ShowProviderRatesSchema.method(:from_hash))) .execute end |
#replace_provider_rate(provider_rate_id, body) ⇒ ProviderRateSchema
TODO: type endpoint description here description here description here
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 100 def replace_provider_rate(provider_rate_id, body) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/fulfillment/provider-rates/{provider_rate_id}', Server::API) .template_param(new_parameter(provider_rate_id, key: 'provider_rate_id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ProviderRateSchema.method(:from_hash))) .execute end |
#replace_provider_rate_priorities(body) ⇒ Hash[String, Mixed]
TODO: type endpoint description here description here
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 27 def replace_provider_rate_priorities(body) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/fulfillment/provider-rate-priorities', Server::API) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(APIHelper.method(:json_serialize)) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:dynamic_deserializer))) .execute end |
#show_provider_rate(provider_rate_id) ⇒ ProviderRateSchema
TODO: type endpoint description here description here
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 79 def show_provider_rate(provider_rate_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/fulfillment/provider-rates/{provider_rate_id}', Server::API) .template_param(new_parameter(provider_rate_id, key: 'provider_rate_id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ProviderRateSchema.method(:from_hash))) .execute end |
#show_provider_rate_priorities ⇒ Hash[String, Mixed]
TODO: type endpoint description here
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/new_store_api/controllers/provider_rates_controller.rb', line 11 def show_provider_rate_priorities @api_call .request(new_request_builder(HttpMethodEnum::GET, '/fulfillment/provider-rate-priorities', Server::API) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:dynamic_deserializer))) .execute end |