Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::CppreferenceController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/cppreference_controller.rb

Overview

CppreferenceController

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 InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::BaseController

Instance Method Details

#setup_capsku_all_legacy(wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation121

This API helps Sellers to completely opt-in or opt-out from CAP program. If the subsidyEnrolled value = “true”, the Seller enrolls in the CAP program. All eligible SKUs (current and future) are by default opt-in. Seller should use the SKU opt-in/opt-out API to opt-out individual items. If the subsidyEnrolled value = “false”, the Seller stops participating in the CAP program and all eligible SKUs (current and future) are opt-out of the CAP program. retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding which identifies each API call and used to track and debug issues; use a random generated GUID for this ID description here

Parameters:

  • wm_sec_access_token (String)

    Required parameter: The access token

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: A unique ID

  • wm_svc_name (String)

    Required parameter: Walmart Service Name

  • accept (String)

    Required parameter: TODO: type description here

  • body (SetupCAPSKUAllLegacyRequest)

    Required parameter: TODO: type

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/cppreference_controller.rb', line 30

def setup_capsku_all_legacy(wm_sec_access_token,
                            wm_consumer_channel_type,
                            wm_qos_correlation_id,
                            wm_svc_name,
                            accept,
                            body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/cppreference',
                                 Server::DEFAULT)
               .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN'))
               .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE'))
               .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID'))
               .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME'))
               .header_param(new_parameter(accept, key: 'Accept'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .body_serializer(proc do |param| param.to_json unless param.nil? end))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(SuccessfulOperation121.method(:from_hash)))
    .execute
end