Module: Peddler::Types::Vehicles20241101

Defined in:
lib/peddler/types/vehicles_2024_11_01/error.rb,
lib/peddler/types/vehicles_2024_11_01/vehicle.rb,
lib/peddler/types/vehicles_2024_11_01/error_list.rb,
lib/peddler/types/vehicles_2024_11_01/pagination.rb,
lib/peddler/types/vehicles_2024_11_01/engine_output.rb,
lib/peddler/types/vehicles_2024_11_01/month_and_year.rb,
lib/peddler/types/vehicles_2024_11_01/vehicles_response.rb,
lib/peddler/types/vehicles_2024_11_01/vehicle_identifiers.rb

Constant Summary collapse

Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute(:details, String)
end
Vehicle =

Combinations of attributes and unique identifier that represents a vehicle in vehicle list.

Structure.new do
  # @return [String] Vehicle Brand.
  attribute(:make, String)

  # @return [String] Specific model of a vehicle.
  attribute(:model, String)

  # @return [String] Name of the vehicle variant.
  attribute(:variant_name, String, from: "variantName")

  # @return [String] Body style of vehicle (example: Hatchback, Cabriolet).
  attribute(:body_style, String, from: "bodyStyle")

  # @return [String] Drive type of vehicle(example: Rear wheel drive).
  attribute(:drive_type, String, from: "driveType")

  # @return [String] Energy Source for the vehicle(example: Petrol)
  attribute(:energy, String)

  # @return [Array<EngineOutput>] Engine output of vehicle.
  attribute(:engine_output, [EngineOutput], from: "engineOutput")

  # @return [MonthAndYear] Vehicle manufacturing start date.
  attribute(:manufacturing_start_date, MonthAndYear, from: "manufacturingStartDate")

  # @return [MonthAndYear] Vehicle manufacturing stop date. If it is empty, then the vehicle is still being
  # manufactured.
  attribute(:manufacturing_stop_date, MonthAndYear, from: "manufacturingStopDate")

  # @return [String] The date on which the vehicle was last updated, in ISO-8601 date/time format.
  attribute(:last_processed_date, String, from: "lastProcessedDate")

  # @return [String] Denotes if the vehicle is active or deleted from Amazon's catalog.
  attribute(:status, String)

  # @return [Array<VehicleIdentifiers>] Identifiers that can be used to identify the vehicle uniquely
  attribute(:identifiers, [VehicleIdentifiers])
end
ErrorList =

A list of error responses returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>] array of errors
  attribute(:errors, [Error])
end
Pagination =

When a request produces a response that exceeds the pageSize, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the nextToken value or the previousToken value as the pageToken parameter in the next request. When you receive the last page, there will be no nextToken key in the pagination object.

Structure.new do
  # @return [String] A token that can be used to fetch the next page.
  attribute(:next_token, String, from: "nextToken")

  # @return [String] A token that can be used to fetch the previous page.
  attribute(:previous_token, String, from: "previousToken")
end
EngineOutput =

Engine power output of vehicle.

Structure.new do
  # @return [Float] Engine power value in specified unit.
  attribute(:value, Float)

  # @return [String] Unit for measuring engine power.
  attribute(:unit, String)
end
MonthAndYear =

Represents a month in a specific year.

Structure.new do
  # @return [Float]
  attribute(:year, Float)

  # @return [Float]
  attribute(:month, Float)
end
VehiclesResponse =

Get paginated list of vehicle from Amazon's catalog

Structure.new do
  # @return [Pagination] If available, the `nextToken` and/or `previousToken` values required to return paginated
  # results.
  attribute(:pagination, Pagination)

  # @return [Array<Vehicle>] List of vehicles from Amazon's catalog.
  attribute(:vehicles, [Vehicle])
end
VehicleIdentifiers =

Combination of vehicle standard and id that can uniquely identify a vehicle from Amazon's catalog.

Structure.new do
  # @return [String] Vehicle standard used to uniquely identify a vehicle.
  attribute(:standard, String)

  # @return [String] Id that can uniquely identify a vehicle based the vehicle identification standard.
  attribute(:value, String)
end