amazon_spapi/models/merchant_fulfillment_v0/
rejected_shipping_service.rs

1/*
2 * Selling Partner API for Merchant Fulfillment
3 *
4 * With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RejectedShippingService : Information about a rejected shipping service
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RejectedShippingService {
17    /// The rejected shipping carrier name. For example, USPS.
18    #[serde(rename = "CarrierName")]
19    pub carrier_name: String,
20    /// The rejected shipping service localized name. For example, FedEx Standard Overnight.
21    #[serde(rename = "ShippingServiceName")]
22    pub shipping_service_name: String,
23    /// An Amazon-defined shipping service identifier.
24    #[serde(rename = "ShippingServiceId")]
25    pub shipping_service_id: String,
26    /// A reason code meant to be consumed programatically. For example, `CARRIER_CANNOT_SHIP_TO_POBOX`.
27    #[serde(rename = "RejectionReasonCode")]
28    pub rejection_reason_code: String,
29    /// A localized human readable description of the rejected reason.
30    #[serde(rename = "RejectionReasonMessage", skip_serializing_if = "Option::is_none")]
31    pub rejection_reason_message: Option<String>,
32}
33
34impl RejectedShippingService {
35    /// Information about a rejected shipping service
36    pub fn new(carrier_name: String, shipping_service_name: String, shipping_service_id: String, rejection_reason_code: String) -> RejectedShippingService {
37        RejectedShippingService {
38            carrier_name,
39            shipping_service_name,
40            shipping_service_id,
41            rejection_reason_code,
42            rejection_reason_message: None,
43        }
44    }
45}
46