Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::StrategyCollectionIdController

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

Overview

StrategyCollectionIdController

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

#delete_repricer_strategy(strategy_collection_id, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation13

Deletes a repricer strategy. Use this API to delete an existing repricer strategy and its corresponding details from the system. For more information and usage examples, refer to the <a href=“developer.walmart.com/us-marketplace/docs/delete-repricer-st rategy”>Pricing API Guide</a>. of the repricer strategy. This strategy collection ID is used to identify the specific repricer strategy that should be deleted. obtained from the Token API. This is required for authenticating requests to Walmart Marketplace APIs. to track the consumer request by channel. Use the Consumer Channel Type received during onboarding. identifies each API call and is used to track and debug issues. Use a randomly generated GUID for this ID. Walmart service being called.

Parameters:

  • strategy_collection_id (String)

    Required parameter: The unique ID

  • wm_sec_access_token (String)

    Required parameter: Access token

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: A unique ID that

  • wm_svc_name (String)

    Required parameter: Specifies the name of the

  • accept (String)

    Required parameter: TODO: type description here

Returns:



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/strategy_collection_id_controller.rb', line 81

def delete_repricer_strategy(strategy_collection_id,
                             wm_sec_access_token,
                             wm_consumer_channel_type,
                             wm_qos_correlation_id,
                             wm_svc_name,
                             accept)
  @api_call
    .request(new_request_builder(HttpMethodEnum::DELETE,
                                 '/repricer/strategy/{strategyCollectionId}',
                                 Server::DEFAULT)
               .template_param(new_parameter(strategy_collection_id, key: 'strategyCollectionId')
                                .should_encode(true))
               .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')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(SuccessfulOperation13.method(:from_hash)))
    .execute
end

#update_repricer_strategy(strategy_collection_id, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation12

Updates an existing repricer strategy. Use this API to modify and update a repricer strategy rule, name, amount, and unit for a given strategy.

For more information and usage examples, refer to the <a

href=“developer.walmart.com/us-marketplace/docs/update-repricer-st rategy”>Pricing API Guide</a>. of the repricer strategy. This strategy collection ID is used to identify the specific repricer strategy that should be updated. obtained from the Token API. This is required for authenticating requests to Walmart Marketplace APIs. to track the consumer request by channel. Use the Consumer Channel Type received during onboarding. identifies each API call and is used to track and debug issues. Use a randomly generated GUID for this ID. Walmart service being called. description here

Parameters:

  • strategy_collection_id (String)

    Required parameter: The unique ID

  • wm_sec_access_token (String)

    Required parameter: Access token

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: A unique ID that

  • wm_svc_name (String)

    Required parameter: Specifies the name of the

  • accept (String)

    Required parameter: TODO: type description here

  • body (UpdateRepricerStrategyRequest)

    Required parameter: TODO: type

Returns:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/strategy_collection_id_controller.rb', line 33

def update_repricer_strategy(strategy_collection_id,
                             wm_sec_access_token,
                             wm_consumer_channel_type,
                             wm_qos_correlation_id,
                             wm_svc_name,
                             accept,
                             body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/repricer/strategy/{strategyCollectionId}',
                                 Server::DEFAULT)
               .template_param(new_parameter(strategy_collection_id, key: 'strategyCollectionId')
                                .should_encode(true))
               .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(SuccessfulOperation12.method(:from_hash)))
    .execute
end