amazon_spapi/models/orders_v0/
regulated_order_verification_status.rs

1/*
2 * Selling Partner API for Orders
3 *
4 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RegulatedOrderVerificationStatus : The verification status of the order, along with associated approval or rejection metadata.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RegulatedOrderVerificationStatus {
17    #[serde(rename = "Status")]
18    pub status: models::orders_v0::VerificationStatus,
19    /// When true, the regulated information provided in the order requires a review by the merchant.
20    #[serde(rename = "RequiresMerchantAction")]
21    pub requires_merchant_action: bool,
22    /// A list of valid rejection reasons that may be used to reject the order's regulated information.
23    #[serde(rename = "ValidRejectionReasons")]
24    pub valid_rejection_reasons: Vec<models::orders_v0::RejectionReason>,
25    #[serde(rename = "RejectionReason", skip_serializing_if = "Option::is_none")]
26    pub rejection_reason: Option<Box<models::orders_v0::RejectionReason>>,
27    /// The date the order was reviewed. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format.
28    #[serde(rename = "ReviewDate", skip_serializing_if = "Option::is_none")]
29    pub review_date: Option<String>,
30    /// The identifier for the order's regulated information reviewer.
31    #[serde(rename = "ExternalReviewerId", skip_serializing_if = "Option::is_none")]
32    pub external_reviewer_id: Option<String>,
33    /// A list of valid verification details that may be provided and the criteria required for when the verification detail can be provided.
34    #[serde(rename = "ValidVerificationDetails", skip_serializing_if = "Option::is_none")]
35    pub valid_verification_details: Option<Vec<models::orders_v0::ValidVerificationDetail>>,
36}
37
38impl RegulatedOrderVerificationStatus {
39    /// The verification status of the order, along with associated approval or rejection metadata.
40    pub fn new(status: models::orders_v0::VerificationStatus, requires_merchant_action: bool, valid_rejection_reasons: Vec<models::orders_v0::RejectionReason>) -> RegulatedOrderVerificationStatus {
41        RegulatedOrderVerificationStatus {
42            status,
43            requires_merchant_action,
44            valid_rejection_reasons,
45            rejection_reason: None,
46            review_date: None,
47            external_reviewer_id: None,
48            valid_verification_details: None,
49        }
50    }
51}
52