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};

/// AdditionalSellerInput : Additional information required to purchase shipping.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdditionalSellerInput {
    /// The data type of the additional information.
    #[serde(rename = "DataType", skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// The value when the data type is string.
    #[serde(rename = "ValueAsString", skip_serializing_if = "Option::is_none")]
    pub value_as_string: Option<String>,
    /// The value when the data type is boolean.
    #[serde(rename = "ValueAsBoolean", skip_serializing_if = "Option::is_none")]
    pub value_as_boolean: Option<bool>,
    /// The value when the data type is integer.
    #[serde(rename = "ValueAsInteger", skip_serializing_if = "Option::is_none")]
    pub value_as_integer: Option<i32>,
    /// Date-time formatted timestamp.
    #[serde(rename = "ValueAsTimestamp", skip_serializing_if = "Option::is_none")]
    pub value_as_timestamp: Option<String>,
    #[serde(rename = "ValueAsAddress", skip_serializing_if = "Option::is_none")]
    pub value_as_address: Option<Box<models::merchant_fulfillment_v0::Address>>,
    #[serde(rename = "ValueAsWeight", skip_serializing_if = "Option::is_none")]
    pub value_as_weight: Option<Box<models::merchant_fulfillment_v0::Weight>>,
    #[serde(rename = "ValueAsDimension", skip_serializing_if = "Option::is_none")]
    pub value_as_dimension: Option<Box<models::merchant_fulfillment_v0::Length>>,
    #[serde(rename = "ValueAsCurrency", skip_serializing_if = "Option::is_none")]
    pub value_as_currency: Option<Box<models::merchant_fulfillment_v0::CurrencyAmount>>,
}

impl AdditionalSellerInput {
    /// Additional information required to purchase shipping.
    pub fn new() -> AdditionalSellerInput {
        AdditionalSellerInput {
            data_type: None,
            value_as_string: None,
            value_as_boolean: None,
            value_as_integer: None,
            value_as_timestamp: None,
            value_as_address: None,
            value_as_weight: None,
            value_as_dimension: None,
            value_as_currency: None,
        }
    }
}