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
/*
 * Selling Partner API for Merchant Fulfillment
 *
 * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// RejectedShippingService : Information about a rejected shipping service



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct RejectedShippingService {
    /// The rejected shipping carrier name. e.g. USPS
    #[serde(default, rename = "CarrierName")]
    pub carrier_name: String,
    /// The rejected shipping service localized name. e.g. FedEx Standard Overnight
    #[serde(default, rename = "ShippingServiceName")]
    pub shipping_service_name: String,
    /// An Amazon-defined shipping service identifier.
    #[serde(default, rename = "ShippingServiceId")]
    pub shipping_service_id: String,
    /// A reason code meant to be consumed programatically. e.g. CARRIER_CANNOT_SHIP_TO_POBOX
    #[serde(default, rename = "RejectionReasonCode")]
    pub rejection_reason_code: String,
    /// A localized human readable description of the rejected reason.
    #[serde(default, rename = "RejectionReasonMessage", skip_serializing_if = "Option::is_none")]
    pub rejection_reason_message: Option<String>,
}

impl RejectedShippingService {
    /// Information about a rejected shipping service
    pub fn new(carrier_name: String, shipping_service_name: String, shipping_service_id: String, rejection_reason_code: String) -> RejectedShippingService {
        RejectedShippingService {
            carrier_name,
            shipping_service_name,
            shipping_service_id,
            rejection_reason_code,
            rejection_reason_message: None,
        }
    }
}