amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Seller Wallet Open Banking API
 *
 * The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.
 *
 * The version of the OpenAPI document: 2024-03-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// TransactionStatus : Represents current status of the transaction.
/// Represents current status of the transaction.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TransactionStatus {
    #[serde(rename = "FAILED")]
    Failed,
    #[serde(rename = "FAILED_CREDITS_APPLIED")]
    FailedCreditsApplied,
    #[serde(rename = "INITIATED")]
    Initiated,
    #[serde(rename = "IN_PROGRESS")]
    InProgress,
    #[serde(rename = "PAYEE_UNDER_REVIEW")]
    PayeeUnderReview,
    #[serde(rename = "SUCCESSFUL")]
    Successful,

}

impl std::fmt::Display for TransactionStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Failed => write!(f, "FAILED"),
            Self::FailedCreditsApplied => write!(f, "FAILED_CREDITS_APPLIED"),
            Self::Initiated => write!(f, "INITIATED"),
            Self::InProgress => write!(f, "IN_PROGRESS"),
            Self::PayeeUnderReview => write!(f, "PAYEE_UNDER_REVIEW"),
            Self::Successful => write!(f, "SUCCESSFUL"),
        }
    }
}

impl Default for TransactionStatus {
    fn default() -> TransactionStatus {
        Self::Failed
    }
}