Skip to main content

amazon_spapi/models/shipping_v2/
excluded_benefit.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/// ExcludedBenefit : Object representing a benefit that is excluded for a shipping offer or rate.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExcludedBenefit {
17    /// benefit
18    #[serde(rename = "benefit")]
19    pub benefit: String,
20    /// List of reasons (eg. LATE_DELIVERY_RISK, etc.) indicating why a benefit is excluded for a shipping offer.
21    #[serde(rename = "reasonCodes", skip_serializing_if = "Option::is_none")]
22    pub reason_codes: Option<Vec<String>>,
23}
24
25impl ExcludedBenefit {
26    /// Object representing a benefit that is excluded for a shipping offer or rate.
27    pub fn new(benefit: String) -> ExcludedBenefit {
28        ExcludedBenefit {
29            benefit,
30            reason_codes: None,
31        }
32    }
33}
34