amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Amazon Shipping API
 *
 * 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.
 *
 * The version of the OpenAPI document: v2
 * Contact: swa-api-core@amazon.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// IneligibleRate : Detailed information for an ineligible shipping service offering.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IneligibleRate {
    /// An identifier for the shipping service.
    #[serde(rename = "serviceId")]
    pub service_id: String,
    /// The name of the shipping service.
    #[serde(rename = "serviceName")]
    pub service_name: String,
    /// The carrier name for the offering.
    #[serde(rename = "carrierName")]
    pub carrier_name: String,
    /// The carrier identifier for the offering, provided by the carrier.
    #[serde(rename = "carrierId")]
    pub carrier_id: String,
    /// A list of reasons why a shipping service offering is ineligible.
    #[serde(rename = "ineligibilityReasons")]
    pub ineligibility_reasons: Vec<models::shipping_v2::IneligibilityReason>,
}

impl IneligibleRate {
    /// Detailed information for an ineligible shipping service offering.
    pub fn new(service_id: String, service_name: String, carrier_name: String, carrier_id: String, ineligibility_reasons: Vec<models::shipping_v2::IneligibilityReason>) -> IneligibleRate {
        IneligibleRate {
            service_id,
            service_name,
            carrier_name,
            carrier_id,
            ineligibility_reasons,
        }
    }
}