amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Merchant Fulfillment
 *
 * 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.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// GetEligibleShipmentServicesResult : The payload for the `getEligibleShipmentServices` operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetEligibleShipmentServicesResult {
    /// A list of shipping services offers.
    #[serde(rename = "ShippingServiceList")]
    pub shipping_service_list: Vec<models::merchant_fulfillment_v0::ShippingService>,
    /// List of services that are for some reason unavailable for this request
    #[serde(rename = "RejectedShippingServiceList", skip_serializing_if = "Option::is_none")]
    pub rejected_shipping_service_list: Option<Vec<models::merchant_fulfillment_v0::RejectedShippingService>>,
    /// A list of temporarily unavailable carriers.
    #[serde(rename = "TemporarilyUnavailableCarrierList", skip_serializing_if = "Option::is_none")]
    pub temporarily_unavailable_carrier_list: Option<Vec<models::merchant_fulfillment_v0::TemporarilyUnavailableCarrier>>,
    /// List of carriers whose terms and conditions were not accepted by the seller.
    #[serde(rename = "TermsAndConditionsNotAcceptedCarrierList", skip_serializing_if = "Option::is_none")]
    pub terms_and_conditions_not_accepted_carrier_list: Option<Vec<models::merchant_fulfillment_v0::TermsAndConditionsNotAcceptedCarrier>>,
}

impl GetEligibleShipmentServicesResult {
    /// The payload for the `getEligibleShipmentServices` operation.
    pub fn new(shipping_service_list: Vec<models::merchant_fulfillment_v0::ShippingService>) -> GetEligibleShipmentServicesResult {
        GetEligibleShipmentServicesResult {
            shipping_service_list,
            rejected_shipping_service_list: None,
            temporarily_unavailable_carrier_list: None,
            terms_and_conditions_not_accepted_carrier_list: None,
        }
    }
}