amazon_spapi/models/shipping_v2/
ineligible_rate.rs

1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// IneligibleRate : Detailed information for an ineligible shipping service offering.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct IneligibleRate {
17    /// An identifier for the shipping service.
18    #[serde(rename = "serviceId")]
19    pub service_id: String,
20    /// The name of the shipping service.
21    #[serde(rename = "serviceName")]
22    pub service_name: String,
23    /// The carrier name for the offering.
24    #[serde(rename = "carrierName")]
25    pub carrier_name: String,
26    /// The carrier identifier for the offering, provided by the carrier.
27    #[serde(rename = "carrierId")]
28    pub carrier_id: String,
29    /// A list of reasons why a shipping service offering is ineligible.
30    #[serde(rename = "ineligibilityReasons")]
31    pub ineligibility_reasons: Vec<models::shipping_v2::IneligibilityReason>,
32}
33
34impl IneligibleRate {
35    /// Detailed information for an ineligible shipping service offering.
36    pub fn new(service_id: String, service_name: String, carrier_name: String, carrier_id: String, ineligibility_reasons: Vec<models::shipping_v2::IneligibilityReason>) -> IneligibleRate {
37        IneligibleRate {
38            service_id,
39            service_name,
40            carrier_name,
41            carrier_id,
42            ineligibility_reasons,
43        }
44    }
45}
46