amazon_spapi/models/fulfillment_outbound_2020_07_01/
cod_settings.rs

1/*
2 * Selling Partner APIs for Fulfillment Outbound
3 *
4 * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
5 *
6 * The version of the OpenAPI document: 2020-07-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CodSettings : The COD (Cash On Delivery) charges that you associate with a COD fulfillment order.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CodSettings {
17    /// When true, this fulfillment order requires a COD (Cash On Delivery) payment.
18    #[serde(rename = "isCodRequired")]
19    pub is_cod_required: bool,
20    #[serde(rename = "codCharge", skip_serializing_if = "Option::is_none")]
21    pub cod_charge: Option<Box<models::fulfillment_outbound_2020_07_01::Money>>,
22    #[serde(rename = "codChargeTax", skip_serializing_if = "Option::is_none")]
23    pub cod_charge_tax: Option<Box<models::fulfillment_outbound_2020_07_01::Money>>,
24    #[serde(rename = "shippingCharge", skip_serializing_if = "Option::is_none")]
25    pub shipping_charge: Option<Box<models::fulfillment_outbound_2020_07_01::Money>>,
26    #[serde(rename = "shippingChargeTax", skip_serializing_if = "Option::is_none")]
27    pub shipping_charge_tax: Option<Box<models::fulfillment_outbound_2020_07_01::Money>>,
28}
29
30impl CodSettings {
31    /// The COD (Cash On Delivery) charges that you associate with a COD fulfillment order.
32    pub fn new(is_cod_required: bool) -> CodSettings {
33        CodSettings {
34            is_cod_required,
35            cod_charge: None,
36            cod_charge_tax: None,
37            shipping_charge: None,
38            shipping_charge_tax: None,
39        }
40    }
41}
42