1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AssociatedItem {
#[serde(default, rename = "asin", skip_serializing_if = "Option::is_none")]
pub asin: Option<String>,
#[serde(default, rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(default, rename = "quantity", skip_serializing_if = "Option::is_none")]
pub quantity: Option<i32>,
#[serde(default, rename = "orderId", skip_serializing_if = "Option::is_none")]
pub order_id: Option<String>,
#[serde(default, rename = "itemStatus", skip_serializing_if = "Option::is_none")]
pub item_status: Option<ItemStatus>,
#[serde(default, rename = "brandName", skip_serializing_if = "Option::is_none")]
pub brand_name: Option<String>,
#[serde(default, rename = "itemDelivery", skip_serializing_if = "Option::is_none")]
pub item_delivery: Option<Box<crate::models::ItemDelivery>>,
}
impl AssociatedItem {
pub fn new() -> AssociatedItem {
AssociatedItem {
asin: None,
title: None,
quantity: None,
order_id: None,
item_status: None,
brand_name: None,
item_delivery: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ItemStatus {
#[serde(rename = "ACTIVE")]
ACTIVE,
#[serde(rename = "CANCELLED")]
CANCELLED,
#[serde(rename = "SHIPPED")]
SHIPPED,
#[serde(rename = "DELIVERED")]
DELIVERED,
}
impl Default for ItemStatus {
fn default() -> ItemStatus {
Self::ACTIVE
}
}