amazon_spapi/models/vendor_invoices/
additional_details.rs

1/*
2 * Selling Partner API for Retail Procurement Payments
3 *
4 * The Selling Partner API for Retail Procurement Payments provides programmatic access to vendors payments data.
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/// AdditionalDetails : Additional information provided by the selling party for tax-related or any other purpose.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AdditionalDetails {
17    /// The type of the additional information provided by the selling party.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// The detail of the additional information provided by the selling party.
21    #[serde(rename = "detail")]
22    pub detail: String,
23    /// The language code of the additional information detail.
24    #[serde(rename = "languageCode", skip_serializing_if = "Option::is_none")]
25    pub language_code: Option<String>,
26}
27
28impl AdditionalDetails {
29    /// Additional information provided by the selling party for tax-related or any other purpose.
30    pub fn new(r#type: Type, detail: String) -> AdditionalDetails {
31        AdditionalDetails {
32            r#type,
33            detail,
34            language_code: None,
35        }
36    }
37}
38/// The type of the additional information provided by the selling party.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "SUR")]
42    Sur,
43    #[serde(rename = "OCR")]
44    Ocr,
45    #[serde(rename = "CartonCount")]
46    CartonCount,
47}
48
49impl Default for Type {
50    fn default() -> Type {
51        Self::Sur
52    }
53}
54