Class: WalmartApIs::GetPricingInsightsApi

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/walmart_ap_is/apis/get_pricing_insights_api.rb

Overview

GetPricingInsightsApi

Constant Summary

Constants inherited from BaseApi

BaseApi::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseApi

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseApi

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters

Constructor Details

This class inherits a constructor from WalmartApIs::BaseApi

Instance Method Details

#get_pricing_insights(wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ ApiResponse

Retrieve pricing insights with filters, sorting, and pagination.Use this API to get comprehensive pricing insights for your items on Walmart Marketplace. You can query your catalog for various pricing attributes, including current price, Buy Box pricing information, competitive pricing information, repricer details, and more. obtained from the Token API. This is required for authenticating requests to Walmart Marketplace APIs. to identify 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:

  • 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 (GetPricingInsightsRequest)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



29
30
31
32
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/walmart_ap_is/apis/get_pricing_insights_api.rb', line 29

def get_pricing_insights(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,
                                 '/price/getPricingInsights',
                                 Server::SERVER_1)
               .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')
                              .is_required(true))
               .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')
                              .is_required(true))
               .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')
                              .is_required(true))
               .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')
                              .is_required(true))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .header_param(new_parameter(accept, key: 'Accept')
                              .is_required(true))
               .body_param(new_parameter(body)
                            .is_required(true))
               .body_serializer(proc do |param| param.to_json unless param.nil? end))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(SuccessfulOperation6.method(:from_hash))
                .is_api_response(true))
    .execute
end