Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::CountController

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

Overview

CountController

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

#getitemcountbygroups(variant_group_id, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation61

This API retrieves the total number of items based on variant group information. Use this endpoint when you need to count items that share a common variant ID. retrieve all items with the same variant id access token retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID Name

Parameters:

  • variant_group_id (String)

    Required parameter: Variant Id to

  • wm_sec_access_token (String)

    Required parameter: (Required) The

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: (Required) A

  • wm_svc_name (String)

    Required parameter: (Required) Walmart Service

  • accept (String)

    Required parameter: TODO: type description here

Returns:



27
28
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
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/count_controller.rb', line 27

def getitemcountbygroups(variant_group_id,
                         wm_sec_access_token,
                         wm_consumer_channel_type,
                         wm_qos_correlation_id,
                         wm_svc_name,
                         accept)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/items/groups/count',
                                 Server::DEFAULT)
               .query_param(new_parameter(variant_group_id, key: 'variantGroupId'))
               .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(SuccessfulOperation61.method(:from_hash))
                .local_error('400',
                             'Bad Request',
                             ItemsGroupsCount400ErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ItemsGroupsCount500ErrorException))
    .execute
end

#getitemscountbystatus(status, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation7

This API retrieves the total number of items filtered by a specific status, such as PUBLISHED or UNPUBLISHED. access token retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID Name

Parameters:

  • status (String)

    Required parameter: Status of Item

  • wm_sec_access_token (String)

    Required parameter: (Required) The

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: (Required) A

  • wm_svc_name (String)

    Required parameter: (Required) Walmart Service

  • accept (String)

    Required parameter: TODO: type description here

Returns:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/count_controller.rb', line 70

def getitemscountbystatus(status,
                          wm_sec_access_token,
                          wm_consumer_channel_type,
                          wm_qos_correlation_id,
                          wm_svc_name,
                          accept)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/items/count',
                                 Server::DEFAULT)
               .query_param(new_parameter(status, key: 'status'))
               .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(SuccessfulOperation7.method(:from_hash))
                .local_error('400',
                             'Bad Request',
                             ItemsCount400ErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ItemsCount500ErrorException))
    .execute
end