Class: NewStoreApi::ShippingLabelsController

Inherits:
BaseController show all
Defined in:
lib/new_store_api/controllers/shipping_labels_controller.rb

Overview

ShippingLabelsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

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

#show_shipping_label(public_key, x_newstore_tenant) ⇒ Object

TODO: type endpoint description here here description here

Parameters:

  • public_key (String)

    Required parameter: TODO: type description

  • x_newstore_tenant (String)

    Required parameter: TODO: type

Returns:

  • (Object)

    Response from the API call.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/new_store_api/controllers/shipping_labels_controller.rb', line 15

def show_shipping_label(public_key,
                        x_newstore_tenant)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/fulfillment/shipping-labels/{public_key}',
                                 Server::API)
               .template_param(new_parameter(public_key, key: 'public_key')
                                .should_encode(true))
               .header_param(new_parameter(x_newstore_tenant, key: 'x-newstore-tenant'))
               .header_param(new_parameter('application/json', key: 'accept')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize)))
    .execute
end