Skip to main content

amazon_spapi/models/product_pricing_v0/
item_condition.rs

1/*
2 * Selling Partner API for Pricing
3 *
4 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ItemCondition : Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
15/// Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum ItemCondition {
18    #[serde(rename = "New")]
19    New,
20    #[serde(rename = "Used")]
21    Used,
22    #[serde(rename = "Collectible")]
23    Collectible,
24    #[serde(rename = "Refurbished")]
25    Refurbished,
26    #[serde(rename = "Club")]
27    Club,
28
29}
30
31impl std::fmt::Display for ItemCondition {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::New => write!(f, "New"),
35            Self::Used => write!(f, "Used"),
36            Self::Collectible => write!(f, "Collectible"),
37            Self::Refurbished => write!(f, "Refurbished"),
38            Self::Club => write!(f, "Club"),
39        }
40    }
41}
42
43impl Default for ItemCondition {
44    fn default() -> ItemCondition {
45        Self::New
46    }
47}
48