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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PredefinedPackageDimensions {
#[serde(rename = "FedEx_Box_10kg")]
FedExBox10kg,
#[serde(rename = "FedEx_Box_25kg")]
FedExBox25kg,
#[serde(rename = "FedEx_Box_Extra_Large_1")]
FedExBoxExtraLarge1,
#[serde(rename = "FedEx_Box_Extra_Large_2")]
FedExBoxExtraLarge2,
#[serde(rename = "FedEx_Box_Large_1")]
FedExBoxLarge1,
#[serde(rename = "FedEx_Box_Large_2")]
FedExBoxLarge2,
#[serde(rename = "FedEx_Box_Medium_1")]
FedExBoxMedium1,
#[serde(rename = "FedEx_Box_Medium_2")]
FedExBoxMedium2,
#[serde(rename = "FedEx_Box_Small_1")]
FedExBoxSmall1,
#[serde(rename = "FedEx_Box_Small_2")]
FedExBoxSmall2,
#[serde(rename = "FedEx_Envelope")]
FedExEnvelope,
#[serde(rename = "FedEx_Padded_Pak")]
FedExPaddedPak,
#[serde(rename = "FedEx_Pak_1")]
FedExPak1,
#[serde(rename = "FedEx_Pak_2")]
FedExPak2,
#[serde(rename = "FedEx_Tube")]
FedExTube,
#[serde(rename = "FedEx_XL_Pak")]
FedExXLPak,
#[serde(rename = "UPS_Box_10kg")]
UPSBox10kg,
#[serde(rename = "UPS_Box_25kg")]
UPSBox25kg,
#[serde(rename = "UPS_Express_Box")]
UPSExpressBox,
#[serde(rename = "UPS_Express_Box_Large")]
UPSExpressBoxLarge,
#[serde(rename = "UPS_Express_Box_Medium")]
UPSExpressBoxMedium,
#[serde(rename = "UPS_Express_Box_Small")]
UPSExpressBoxSmall,
#[serde(rename = "UPS_Express_Envelope")]
UPSExpressEnvelope,
#[serde(rename = "UPS_Express_Hard_Pak")]
UPSExpressHardPak,
#[serde(rename = "UPS_Express_Legal_Envelope")]
UPSExpressLegalEnvelope,
#[serde(rename = "UPS_Express_Pak")]
UPSExpressPak,
#[serde(rename = "UPS_Express_Tube")]
UPSExpressTube,
#[serde(rename = "UPS_Laboratory_Pak")]
UPSLaboratoryPak,
#[serde(rename = "UPS_Pad_Pak")]
UPSPadPak,
#[serde(rename = "UPS_Pallet")]
UPSPallet,
#[serde(rename = "USPS_Card")]
USPSCard,
#[serde(rename = "USPS_Flat")]
USPSFlat,
#[serde(rename = "USPS_FlatRateCardboardEnvelope")]
USPSFlatRateCardboardEnvelope,
#[serde(rename = "USPS_FlatRateEnvelope")]
USPSFlatRateEnvelope,
#[serde(rename = "USPS_FlatRateGiftCardEnvelope")]
USPSFlatRateGiftCardEnvelope,
#[serde(rename = "USPS_FlatRateLegalEnvelope")]
USPSFlatRateLegalEnvelope,
#[serde(rename = "USPS_FlatRatePaddedEnvelope")]
USPSFlatRatePaddedEnvelope,
#[serde(rename = "USPS_FlatRateWindowEnvelope")]
USPSFlatRateWindowEnvelope,
#[serde(rename = "USPS_LargeFlatRateBoardGameBox")]
USPSLargeFlatRateBoardGameBox,
#[serde(rename = "USPS_LargeFlatRateBox")]
USPSLargeFlatRateBox,
#[serde(rename = "USPS_Letter")]
USPSLetter,
#[serde(rename = "USPS_MediumFlatRateBox1")]
USPSMediumFlatRateBox1,
#[serde(rename = "USPS_MediumFlatRateBox2")]
USPSMediumFlatRateBox2,
#[serde(rename = "USPS_RegionalRateBoxA1")]
USPSRegionalRateBoxA1,
#[serde(rename = "USPS_RegionalRateBoxA2")]
USPSRegionalRateBoxA2,
#[serde(rename = "USPS_RegionalRateBoxB1")]
USPSRegionalRateBoxB1,
#[serde(rename = "USPS_RegionalRateBoxB2")]
USPSRegionalRateBoxB2,
#[serde(rename = "USPS_RegionalRateBoxC")]
USPSRegionalRateBoxC,
#[serde(rename = "USPS_SmallFlatRateBox")]
USPSSmallFlatRateBox,
#[serde(rename = "USPS_SmallFlatRateEnvelope")]
USPSSmallFlatRateEnvelope,
}
impl ToString for PredefinedPackageDimensions {
fn to_string(&self) -> String {
match self {
Self::FedExBox10kg => String::from("FedEx_Box_10kg"),
Self::FedExBox25kg => String::from("FedEx_Box_25kg"),
Self::FedExBoxExtraLarge1 => String::from("FedEx_Box_Extra_Large_1"),
Self::FedExBoxExtraLarge2 => String::from("FedEx_Box_Extra_Large_2"),
Self::FedExBoxLarge1 => String::from("FedEx_Box_Large_1"),
Self::FedExBoxLarge2 => String::from("FedEx_Box_Large_2"),
Self::FedExBoxMedium1 => String::from("FedEx_Box_Medium_1"),
Self::FedExBoxMedium2 => String::from("FedEx_Box_Medium_2"),
Self::FedExBoxSmall1 => String::from("FedEx_Box_Small_1"),
Self::FedExBoxSmall2 => String::from("FedEx_Box_Small_2"),
Self::FedExEnvelope => String::from("FedEx_Envelope"),
Self::FedExPaddedPak => String::from("FedEx_Padded_Pak"),
Self::FedExPak1 => String::from("FedEx_Pak_1"),
Self::FedExPak2 => String::from("FedEx_Pak_2"),
Self::FedExTube => String::from("FedEx_Tube"),
Self::FedExXLPak => String::from("FedEx_XL_Pak"),
Self::UPSBox10kg => String::from("UPS_Box_10kg"),
Self::UPSBox25kg => String::from("UPS_Box_25kg"),
Self::UPSExpressBox => String::from("UPS_Express_Box"),
Self::UPSExpressBoxLarge => String::from("UPS_Express_Box_Large"),
Self::UPSExpressBoxMedium => String::from("UPS_Express_Box_Medium"),
Self::UPSExpressBoxSmall => String::from("UPS_Express_Box_Small"),
Self::UPSExpressEnvelope => String::from("UPS_Express_Envelope"),
Self::UPSExpressHardPak => String::from("UPS_Express_Hard_Pak"),
Self::UPSExpressLegalEnvelope => String::from("UPS_Express_Legal_Envelope"),
Self::UPSExpressPak => String::from("UPS_Express_Pak"),
Self::UPSExpressTube => String::from("UPS_Express_Tube"),
Self::UPSLaboratoryPak => String::from("UPS_Laboratory_Pak"),
Self::UPSPadPak => String::from("UPS_Pad_Pak"),
Self::UPSPallet => String::from("UPS_Pallet"),
Self::USPSCard => String::from("USPS_Card"),
Self::USPSFlat => String::from("USPS_Flat"),
Self::USPSFlatRateCardboardEnvelope => String::from("USPS_FlatRateCardboardEnvelope"),
Self::USPSFlatRateEnvelope => String::from("USPS_FlatRateEnvelope"),
Self::USPSFlatRateGiftCardEnvelope => String::from("USPS_FlatRateGiftCardEnvelope"),
Self::USPSFlatRateLegalEnvelope => String::from("USPS_FlatRateLegalEnvelope"),
Self::USPSFlatRatePaddedEnvelope => String::from("USPS_FlatRatePaddedEnvelope"),
Self::USPSFlatRateWindowEnvelope => String::from("USPS_FlatRateWindowEnvelope"),
Self::USPSLargeFlatRateBoardGameBox => String::from("USPS_LargeFlatRateBoardGameBox"),
Self::USPSLargeFlatRateBox => String::from("USPS_LargeFlatRateBox"),
Self::USPSLetter => String::from("USPS_Letter"),
Self::USPSMediumFlatRateBox1 => String::from("USPS_MediumFlatRateBox1"),
Self::USPSMediumFlatRateBox2 => String::from("USPS_MediumFlatRateBox2"),
Self::USPSRegionalRateBoxA1 => String::from("USPS_RegionalRateBoxA1"),
Self::USPSRegionalRateBoxA2 => String::from("USPS_RegionalRateBoxA2"),
Self::USPSRegionalRateBoxB1 => String::from("USPS_RegionalRateBoxB1"),
Self::USPSRegionalRateBoxB2 => String::from("USPS_RegionalRateBoxB2"),
Self::USPSRegionalRateBoxC => String::from("USPS_RegionalRateBoxC"),
Self::USPSSmallFlatRateBox => String::from("USPS_SmallFlatRateBox"),
Self::USPSSmallFlatRateEnvelope => String::from("USPS_SmallFlatRateEnvelope"),
}
}
}
impl Default for PredefinedPackageDimensions {
fn default() -> PredefinedPackageDimensions {
Self::FedExBox10kg
}
}