Skip to main content

amazon_spapi/models/fba_inbound/
item_eligibility_preview.rs

1/*
2 * Selling Partner API for FBA Inbound Eligibilty
3 *
4 * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon's fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon's fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon's fulfillment centers.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ItemEligibilityPreview : The response object which contains the ASIN, marketplaceId if required, eligibility program, the eligibility status (boolean), and a list of ineligibility reason codes.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ItemEligibilityPreview {
17    /// The ASIN for which eligibility was determined.
18    #[serde(rename = "asin")]
19    pub asin: String,
20    /// The marketplace for which eligibility was determined.
21    #[serde(rename = "marketplaceId", skip_serializing_if = "Option::is_none")]
22    pub marketplace_id: Option<String>,
23    /// The program for which eligibility was determined.
24    #[serde(rename = "program")]
25    pub program: Program,
26    /// Indicates if the item is eligible for the program.
27    #[serde(rename = "isEligibleForProgram")]
28    pub is_eligible_for_program: bool,
29    /// Potential Ineligibility Reason Codes.
30    #[serde(rename = "ineligibilityReasonList", skip_serializing_if = "Option::is_none")]
31    pub ineligibility_reason_list: Option<Vec<IneligibilityReasonList>>,
32}
33
34impl ItemEligibilityPreview {
35    /// The response object which contains the ASIN, marketplaceId if required, eligibility program, the eligibility status (boolean), and a list of ineligibility reason codes.
36    pub fn new(asin: String, program: Program, is_eligible_for_program: bool) -> ItemEligibilityPreview {
37        ItemEligibilityPreview {
38            asin,
39            marketplace_id: None,
40            program,
41            is_eligible_for_program,
42            ineligibility_reason_list: None,
43        }
44    }
45}
46/// The program for which eligibility was determined.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Program {
49    #[serde(rename = "INBOUND")]
50    Inbound,
51    #[serde(rename = "COMMINGLING")]
52    Commingling,
53}
54
55impl Default for Program {
56    fn default() -> Program {
57        Self::Inbound
58    }
59}
60/// Potential Ineligibility Reason Codes.
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum IneligibilityReasonList {
63    #[serde(rename = "FBA_INB_0004")]
64    FbaInb0004,
65    #[serde(rename = "FBA_INB_0006")]
66    FbaInb0006,
67    #[serde(rename = "FBA_INB_0007")]
68    FbaInb0007,
69    #[serde(rename = "FBA_INB_0008")]
70    FbaInb0008,
71    #[serde(rename = "FBA_INB_0009")]
72    FbaInb0009,
73    #[serde(rename = "FBA_INB_0010")]
74    FbaInb0010,
75    #[serde(rename = "FBA_INB_0011")]
76    FbaInb0011,
77    #[serde(rename = "FBA_INB_0012")]
78    FbaInb0012,
79    #[serde(rename = "FBA_INB_0013")]
80    FbaInb0013,
81    #[serde(rename = "FBA_INB_0014")]
82    FbaInb0014,
83    #[serde(rename = "FBA_INB_0015")]
84    FbaInb0015,
85    #[serde(rename = "FBA_INB_0016")]
86    FbaInb0016,
87    #[serde(rename = "FBA_INB_0017")]
88    FbaInb0017,
89    #[serde(rename = "FBA_INB_0018")]
90    FbaInb0018,
91    #[serde(rename = "FBA_INB_0019")]
92    FbaInb0019,
93    #[serde(rename = "FBA_INB_0034")]
94    FbaInb0034,
95    #[serde(rename = "FBA_INB_0035")]
96    FbaInb0035,
97    #[serde(rename = "FBA_INB_0036")]
98    FbaInb0036,
99    #[serde(rename = "FBA_INB_0037")]
100    FbaInb0037,
101    #[serde(rename = "FBA_INB_0038")]
102    FbaInb0038,
103    #[serde(rename = "FBA_INB_0050")]
104    FbaInb0050,
105    #[serde(rename = "FBA_INB_0051")]
106    FbaInb0051,
107    #[serde(rename = "FBA_INB_0053")]
108    FbaInb0053,
109    #[serde(rename = "FBA_INB_0055")]
110    FbaInb0055,
111    #[serde(rename = "FBA_INB_0056")]
112    FbaInb0056,
113    #[serde(rename = "FBA_INB_0059")]
114    FbaInb0059,
115    #[serde(rename = "FBA_INB_0065")]
116    FbaInb0065,
117    #[serde(rename = "FBA_INB_0066")]
118    FbaInb0066,
119    #[serde(rename = "FBA_INB_0067")]
120    FbaInb0067,
121    #[serde(rename = "FBA_INB_0068")]
122    FbaInb0068,
123    #[serde(rename = "FBA_INB_0095")]
124    FbaInb0095,
125    #[serde(rename = "FBA_INB_0097")]
126    FbaInb0097,
127    #[serde(rename = "FBA_INB_0098")]
128    FbaInb0098,
129    #[serde(rename = "FBA_INB_0099")]
130    FbaInb0099,
131    #[serde(rename = "FBA_INB_0100")]
132    FbaInb0100,
133    #[serde(rename = "FBA_INB_0103")]
134    FbaInb0103,
135    #[serde(rename = "FBA_INB_0104")]
136    FbaInb0104,
137    #[serde(rename = "FBA_INB_0197")]
138    FbaInb0197,
139    #[serde(rename = "UNKNOWN_INB_ERROR_CODE")]
140    UnknownInbErrorCode,
141}
142
143impl Default for IneligibilityReasonList {
144    fn default() -> IneligibilityReasonList {
145        Self::FbaInb0004
146    }
147}
148