Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::ItemsController

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

Overview

ItemsController

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

#allitems(next_cursor, sku, gtin, offset, limit, lifecycle_status, published_status, variant_group_id, condition, availability, show_duplicate_item_info, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation9

This API endpoint allows you to retrieve a complete list of items from a partner’s catalog, supporting pagination through ‘nextCursor` or `offset` and `limit` parameters. Each item response includes an `isDuplicate` field to indicate whether an item is a duplicate. You can optionally include the `showDuplicateItemInfo` parameter to receive additional details about duplicate items, such as a `destinationItem` property that provides relevant information. Throttling: This endpoint is throttled at a maximum of 300 transactions per minute (TPM) per seller. When called with the showDuplicateItemInfo parameter, this is reduced to 60 TPM. when more than 200 items are retrieved. nextCursor value received in response will be same for all subsequent page requests. alphanumeric unique ID specified by the seller. This is used to identify an item. unique identifier for a product that is recognized internationally. This must be 14 digits. with, where 0 is the first entity that can be requested. It can only be used when includeDetails is set to true. returned. It cannot be more than 50 entities. Use it only when the includeDetails is set to true. in the overall lifecycle. in the submission process. items in a variant group. Different variant group IDs will be in different groups. product. product. parameter: Indicates whether to include details of duplicate items in the response. Set this parameter to true if you want to receive information on duplicate items. 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:

  • next_cursor (String)

    Required parameter: A pagination method used

  • sku (String)

    Required parameter: Stock Keeping Unit is an arbitrary

  • gtin (String)

    Required parameter: Global Trade Item Number is a

  • offset (Integer)

    Required parameter: The object response to start

  • limit (Integer)

    Required parameter: The number of entities to be

  • lifecycle_status (String)

    Required parameter: The status of an item

  • published_status (String)

    Required parameter: The status of an item

  • variant_group_id (String)

    Required parameter: Identifies all of the

  • condition (String)

    Required parameter: The condition of a

  • availability (String)

    Required parameter: The availability of a

  • show_duplicate_item_info (TrueClass | FalseClass)

    Required

  • 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:



63
64
65
66
67
68
69
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
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/items_controller.rb', line 63

def allitems(next_cursor,
             sku,
             gtin,
             offset,
             limit,
             lifecycle_status,
             published_status,
             variant_group_id,
             condition,
             availability,
             show_duplicate_item_info,
             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',
                                 Server::DEFAULT)
               .query_param(new_parameter(next_cursor, key: 'nextCursor'))
               .query_param(new_parameter(sku, key: 'sku'))
               .query_param(new_parameter(gtin, key: 'gtin'))
               .query_param(new_parameter(offset, key: 'offset'))
               .query_param(new_parameter(limit, key: 'limit'))
               .query_param(new_parameter(lifecycle_status, key: 'lifecycleStatus'))
               .query_param(new_parameter(published_status, key: 'publishedStatus'))
               .query_param(new_parameter(variant_group_id, key: 'variantGroupId'))
               .query_param(new_parameter(condition, key: 'condition'))
               .query_param(new_parameter(availability, key: 'availability'))
               .query_param(new_parameter(show_duplicate_item_info, key: 'showDuplicateItemInfo'))
               .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(SuccessfulOperation9.method(:from_hash))
                .local_error('400',
                             'Bad Request',
                             Items400ErrorException)
                .local_error('500',
                             'Internal Server Error',
                             Items500ErrorException))
    .execute
end