amazon_spapi/models/shipping/
rate.rs

1/*
2 * Selling Partner API for Shipping
3 *
4 * Provides programmatic access to Amazon Shipping APIs.   **Note:** If you are new to the Amazon Shipping API, refer to the latest version of <a href=\"https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference\">Amazon Shipping API (v2)</a> on the <a href=\"https://developer-docs.amazon.com/amazon-shipping/\">Amazon Shipping Developer Documentation</a> site.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Rate : The available rate that can be used to send the shipment
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Rate {
17    /// An identifier for the rate.
18    #[serde(rename = "rateId", skip_serializing_if = "Option::is_none")]
19    pub rate_id: Option<String>,
20    #[serde(rename = "totalCharge", skip_serializing_if = "Option::is_none")]
21    pub total_charge: Option<Box<models::shipping::Currency>>,
22    #[serde(rename = "billedWeight", skip_serializing_if = "Option::is_none")]
23    pub billed_weight: Option<Box<models::shipping::Weight>>,
24    /// The time after which the offering will expire.
25    #[serde(rename = "expirationTime", skip_serializing_if = "Option::is_none")]
26    pub expiration_time: Option<String>,
27    #[serde(rename = "serviceType", skip_serializing_if = "Option::is_none")]
28    pub service_type: Option<models::shipping::ServiceType>,
29    #[serde(rename = "promise", skip_serializing_if = "Option::is_none")]
30    pub promise: Option<Box<models::shipping::ShippingPromiseSet>>,
31}
32
33impl Rate {
34    /// The available rate that can be used to send the shipment
35    pub fn new() -> Rate {
36        Rate {
37            rate_id: None,
38            total_charge: None,
39            billed_weight: None,
40            expiration_time: None,
41            service_type: None,
42            promise: None,
43        }
44    }
45}
46