Class: Peddler::APIs::Vehicles20241101

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/vehicles_2024_11_01.rb

Overview

The Selling Partner API for Automotive.

The Selling Partner API for Automotive provides programmatic access to information needed by selling partners to provide compatibility information about their listed products.

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #parser, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_vehicles(marketplace_id, vehicle_type, page_token: nil, updated_after: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Get the latest collection of vehicles



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/peddler/apis/vehicles_2024_11_01.rb', line 27

def get_vehicles(marketplace_id, vehicle_type, page_token: nil, updated_after: nil)
  path = "/catalog/2024-11-01/automotive/vehicles"
  params = {
    "pageToken" => page_token,
    "marketplaceId" => marketplace_id,
    "vehicleType" => vehicle_type,
    "updatedAfter" => updated_after,
  }.compact

  get(path, params:)
end