Class: WalmartApIs::ProductPricingApi

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

Overview

ProductPricingApi

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_competitive_pricing(marketplace_id, item_type, skus: nil, walmart_item_ids: nil, customer_type: nil) ⇒ ApiResponse

Returns competitive pricing information for a seller's offer listings based on seller SKU or Walmart Item ID (see ADR-029). identifier. Specifies the marketplace for which prices are returned. Item ID values or seller SKU values are used to identify items. seller SKU values used to identify items in the given marketplace. to twenty Walmart Item ID values used to identify items in the given marketplace. to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.

Parameters:

  • marketplace_id (MarketplaceId)

    Required parameter: A marketplace

  • item_type (ItemType)

    Required parameter: Indicates whether Walmart

  • skus (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • walmart_item_ids (Array[String]) (defaults to: nil)

    Optional parameter: A list of up

  • customer_type (CustomerType) (defaults to: nil)

    Optional parameter: Indicates whether

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 88

def get_competitive_pricing(marketplace_id,
                            item_type,
                            skus: nil,
                            walmart_item_ids: nil,
                            customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/competitivePrice',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_type, key: 'ItemType')
                             .is_required(true))
               .query_param(new_parameter(skus, key: 'Skus'))
               .query_param(new_parameter(walmart_item_ids, key: 'walmartItemIds'))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetPricingResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_competitive_pricing1(marketplace_id, item_type, asins: nil, skus: nil, customer_type: nil) ⇒ ApiResponse

TODO: type endpoint description here identifier. Specifies the marketplace for which prices are returned. values or seller SKU values are used to identify items. If you specify Asin, the information in t SP-API Standard Identification Number (ASIN) values used to identify items in the given marketpla seller SKU values used to identify items in the given marketplace. request pricing information from the point of view of Consumer or Business buyers. Default is Consu

Parameters:

  • marketplace_id (String)

    Required parameter: A marketplace

  • item_type (String)

    Required parameter: Indicates whether ASIN

  • asins (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • skus (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • customer_type (String) (defaults to: nil)

    Optional parameter: Indicates whether to

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 490

def get_competitive_pricing1(marketplace_id,
                             item_type,
                             asins: nil,
                             skus: nil,
                             customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/competitivePrice',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_type, key: 'ItemType')
                             .is_required(true))
               .query_param(new_parameter(asins, key: 'Asins'))
               .query_param(new_parameter(skus, key: 'Skus'))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_competitive_summary(body) ⇒ ApiResponse

Returns competitive summary including featured buying options and lowest priced offers for a batch of Walmart Item IDs (see ADR-029). Phase 1 stub — no upstream data source identified. Returns HTTP 501 until an upstream is confirmed. Track: RCTPAPI-20858. type description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 331

def get_competitive_summary(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/items/competitiveSummary',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CompetitiveSummaryBatchResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_competitive_summary1(body) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 692

def get_competitive_summary1(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/items/competitiveSummary',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

Returns the featured offer expected price (FOEP) for a batch of seller SKUs. Phase 1 stub — no upstream data source identified. Returns HTTP 501 until an upstream is confirmed. Track: RCTPAPI-20858. parameter: TODO: type description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 372

def get_featured_offer_expected_price_batch(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/offer/featuredOfferExpectedPrice',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetFeaturedOfferExpectedPriceBatchResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

TODO: type endpoint description here

Parameters:

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 727

def get_featured_offer_expected_price_batch1(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/offer/featuredOfferExpectedPrice',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_item_offers(item_id, marketplace_id, item_condition, customer_type: nil) ⇒ ApiResponse

Returns the lowest priced offers for a single item based on Walmart Item ID and item condition. Uses Walmart Item ID as the primary identifier per ADR-029 (ASIN not supported — no ASIN resolver exists in the Walmart platform; IQS queries by product.item_id). Backed by IQS catalog_index cross-seller query (same as getListingOffers hop-2). Returns 404 when no offers are found for the given itemId. item. identifier. Specifies the marketplace for which prices are returned. offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. to request Consumer or Business offers. Default is Consumer.

Parameters:

  • item_id (String)

    Required parameter: The Walmart Item ID of the

  • marketplace_id (String)

    Required parameter: A marketplace

  • item_condition (ConditionType2)

    Required parameter: Filters the

  • customer_type (CustomerType) (defaults to: nil)

    Optional parameter: Indicates whether

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 199

def get_item_offers(item_id,
                    marketplace_id,
                    item_condition,
                    customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/items/{itemId}/offers',
                                 Server::DEFAULT1)
               .template_param(new_parameter(item_id, key: 'itemId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_condition, key: 'ItemCondition')
                             .is_required(true))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetOffersResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_item_offers1(marketplace_id, item_condition, asin, customer_type: nil) ⇒ ApiResponse

TODO: type endpoint description here identifier. Specifies the marketplace for which prices are returned. listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbishe Identification Number (ASIN) of the item. request Consumer or Business offers. Default is Consumer.

Parameters:

  • marketplace_id (String)

    Required parameter: A marketplace

  • item_condition (String)

    Required parameter: Filters the offer

  • asin (String)

    Required parameter: The SP-API Standard

  • customer_type (String) (defaults to: nil)

    Optional parameter: Indicates whether to

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 540

def get_item_offers1(marketplace_id,
                     item_condition,
                     asin,
                     customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/items/{Asin}/offers',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_condition, key: 'ItemCondition')
                             .is_required(true))
               .template_param(new_parameter(asin, key: 'Asin')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_item_offers_batch(body) ⇒ ApiResponse

Batch version of getItemOffers. Accepts up to 20 Walmart Item ID requests. Uses Walmart Item ID as the primary identifier per ADR-029. Implemented as in-process fan-out over getItemOffers. Each item gets its own per-item HTTP status code in the response body; the outer HTTP response is always 200. Implemented: RCTPAPI-20856. description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 248

def get_item_offers_batch(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/itemOffers',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetItemOffersBatchResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_item_offers_batch1(body) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 408

def get_item_offers_batch1(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/itemOffers',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_listing_offers(seller_sku, marketplace_id, item_condition, customer_type: nil) ⇒ ApiResponse

Returns the lowest priced offers for a single SKU listing, based on SKU and item condition. given marketplace. SellerSKU is qualified by the seller's SellerId. identifier. Specifies the marketplace for which prices are returned. offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. to request Consumer or Business offers. Default is Consumer.

Parameters:

  • seller_sku (String)

    Required parameter: Identifies an item in the

  • marketplace_id (MarketplaceId)

    Required parameter: A marketplace

  • item_condition (ConditionType2)

    Required parameter: Filters the

  • customer_type (CustomerType) (defaults to: nil)

    Optional parameter: Indicates whether

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 140

def get_listing_offers(seller_sku,
                       marketplace_id,
                       item_condition,
                       customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/listings/{SellerSKU}/offers',
                                 Server::DEFAULT1)
               .template_param(new_parameter(seller_sku, key: 'SellerSKU')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_condition, key: 'ItemCondition')
                             .is_required(true))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetOffersResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_listing_offers1(marketplace_id, item_condition, seller_sku, customer_type: nil) ⇒ ApiResponse

TODO: type endpoint description here identifier. Specifies the marketplace for which prices are returned. listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with eve request Consumer or Business offers. Default is Consumer.

Parameters:

  • marketplace_id (String)

    Required parameter: A marketplace

  • item_condition (String)

    Required parameter: Filters the offer

  • seller_sku (String)

    Required parameter: Identifies an item in the

  • customer_type (String) (defaults to: nil)

    Optional parameter: Indicates whether to

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 591

def get_listing_offers1(marketplace_id,
                        item_condition,
                        seller_sku,
                        customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/listings/{SellerSKU}/offers',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_condition, key: 'ItemCondition')
                             .is_required(true))
               .template_param(new_parameter(seller_sku, key: 'SellerSKU')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_listing_offers_batch(body) ⇒ ApiResponse

Batch version of getListingOffers. Accepts up to 20 SKU requests. Implemented as in-process fan-out over getListingOffers (IQS-backed). Each SKU gets its own per-item HTTP status code in the response body; the outer HTTP response is always 200. Implemented: RCTPAPI-20857. description here

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 289

def get_listing_offers_batch(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/listingOffers',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetListingOffersBatchResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_listing_offers_batch1(body) ⇒ ApiResponse

TODO: type endpoint description here

Parameters:

  • body (Object)

    Required parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 443

def get_listing_offers_batch1(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/batches/products/pricing/v4/listingOffers',
                                 Server::DEFAULT1)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .is_required(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end

#get_pricing(marketplace_id, item_type, skus: nil, walmart_item_ids: nil, item_condition: nil, offer_type: nil, customer_type: nil) ⇒ ApiResponse

Returns pricing information for a seller's active offer listings based on seller SKU or Walmart Item ID (see ADR-029). identifier. Specifies the marketplace for which prices are returned. Item ID values or seller SKU values are used to identify items. seller SKU values used to identify items in the given marketplace. to twenty Walmart Item ID values used to identify items in the given marketplace. offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. request pricing information for the seller's B2C or B2B offers. Default is B2C. to request Consumer or Business offers. Default is Consumer.

Parameters:

  • marketplace_id (MarketplaceId)

    Required parameter: A marketplace

  • item_type (ItemType)

    Required parameter: Indicates whether Walmart

  • skus (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • walmart_item_ids (Array[String]) (defaults to: nil)

    Optional parameter: A list of up

  • item_condition (ConditionType2) (defaults to: nil)

    Optional parameter: Filters the

  • offer_type (OfferType) (defaults to: nil)

    Optional parameter: Indicates whether to

  • customer_type (CustomerType) (defaults to: nil)

    Optional parameter: Indicates whether

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
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 29

def get_pricing(marketplace_id,
                item_type,
                skus: nil,
                walmart_item_ids: nil,
                item_condition: nil,
                offer_type: nil,
                customer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/price',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_type, key: 'ItemType')
                             .is_required(true))
               .query_param(new_parameter(skus, key: 'Skus'))
               .query_param(new_parameter(walmart_item_ids, key: 'walmartItemIds'))
               .query_param(new_parameter(item_condition, key: 'ItemCondition'))
               .query_param(new_parameter(offer_type, key: 'OfferType'))
               .query_param(new_parameter(customer_type, key: 'CustomerType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetPricingResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorErrorException))
    .execute
end

#get_pricing1(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil) ⇒ ApiResponse

TODO: type endpoint description here identifier. Specifies the marketplace for which prices are returned. values or seller SKU values are used to identify items. If you specify Asin, the information in t SP-API Standard Identification Number (ASIN) values used to identify items in the given marketpla seller SKU values used to identify items in the given marketplace. listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. request pricing information for the seller's B2C or B2B offers. Default is B2C.

Parameters:

  • marketplace_id (String)

    Required parameter: A marketplace

  • item_type (String)

    Required parameter: Indicates whether ASIN

  • asins (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • skus (Array[String]) (defaults to: nil)

    Optional parameter: A list of up to twenty

  • item_condition (String) (defaults to: nil)

    Optional parameter: Filters the offer

  • offer_type (String) (defaults to: nil)

    Optional parameter: Indicates whether to

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/walmart_ap_is/apis/product_pricing_api.rb', line 648

def get_pricing1(marketplace_id,
                 item_type,
                 asins: nil,
                 skus: nil,
                 item_condition: nil,
                 offer_type: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/products/pricing/v4/price',
                                 Server::DEFAULT1)
               .query_param(new_parameter(marketplace_id, key: 'MarketplaceId')
                             .is_required(true))
               .query_param(new_parameter(item_type, key: 'ItemType')
                             .is_required(true))
               .query_param(new_parameter(asins, key: 'Asins'))
               .query_param(new_parameter(skus, key: 'Skus'))
               .query_param(new_parameter(item_condition, key: 'ItemCondition'))
               .query_param(new_parameter(offer_type, key: 'OfferType'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('walletAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize))
                .is_api_response(true)
                .local_error('400',
                             'Bad Request',
                             ErrorListErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorListErrorException)
                .local_error('404',
                             'Not Found',
                             ErrorListErrorException)
                .local_error('429',
                             'Rate limit exceeded',
                             ErrorListErrorException)
                .local_error('500',
                             'Internal Server Error',
                             ErrorListErrorException))
    .execute
end