Skip to main content

amazon_spapi/models/product_pricing_2022_05_01/
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 pricing information for Amazon Marketplace products.  For more information, refer to the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
5 *
6 * The version of the OpenAPI document: 2022-05-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Condition : The condition of the item.
15/// The condition of the item.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum Condition {
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 Condition {
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 Condition {
44    fn default() -> Condition {
45        Self::New
46    }
47}
48