Skip to main content

amazon_spapi/models/shipping_v2/
benefits.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/// Benefits : Benefits that are included and excluded for each shipping offer. Benefits represents services provided by Amazon (eg. CLAIMS_PROTECTED, etc.) when sellers purchase shipping through Amazon. Benefit details will be made available for any shipment placed on or after January 1st 2024 00:00 UTC.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Benefits {
17    /// A list of included benefits.
18    #[serde(rename = "includedBenefits")]
19    pub included_benefits: Vec<String>,
20    /// A list of excluded benefit. Refer to the ExcludeBenefit object for further documentation
21    #[serde(rename = "excludedBenefits")]
22    pub excluded_benefits: Vec<models::shipping_v2::ExcludedBenefit>,
23}
24
25impl Benefits {
26    /// Benefits that are included and excluded for each shipping offer. Benefits represents services provided by Amazon (eg. CLAIMS_PROTECTED, etc.) when sellers purchase shipping through Amazon. Benefit details will be made available for any shipment placed on or after January 1st 2024 00:00 UTC.
27    pub fn new(included_benefits: Vec<String>, excluded_benefits: Vec<models::shipping_v2::ExcludedBenefit>) -> Benefits {
28        Benefits {
29            included_benefits,
30            excluded_benefits,
31        }
32    }
33}
34