amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Invoices.
 *
 * Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
 *
 * The version of the OpenAPI document: 2024-06-19
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Export : Detailed information about the export.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Export {
    /// When the export generation fails, this attribute contains a description of the error.
    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<String>,
    /// The export identifier.
    #[serde(rename = "exportId", skip_serializing_if = "Option::is_none")]
    pub export_id: Option<String>,
    /// The date and time when the export generation finished. Vales are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
    #[serde(rename = "generateExportFinishedAt", skip_serializing_if = "Option::is_none")]
    pub generate_export_finished_at: Option<String>,
    /// The date and time when the export generation started. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
    #[serde(rename = "generateExportStartedAt", skip_serializing_if = "Option::is_none")]
    pub generate_export_started_at: Option<String>,
    /// The identifier for the export documents. To get the information required to retrieve the export document's contents, pass each ID in the `getInvoicesDocument` operation.  This list is empty until the status is `DONE`.
    #[serde(rename = "invoicesDocumentIds", skip_serializing_if = "Option::is_none")]
    pub invoices_document_ids: Option<Vec<String>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::invoices_2024_06_19::ExportStatus>,
}

impl Export {
    /// Detailed information about the export.
    pub fn new() -> Export {
        Export {
            error_message: None,
            export_id: None,
            generate_export_finished_at: None,
            generate_export_started_at: None,
            invoices_document_ids: None,
            status: None,
        }
    }
}