dodopayments_rust 2.2.1

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCheckoutSessionsStatus {
    /// Created at timestamp
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Customer email: prefers payment's customer, falls back to session
    #[serde(rename = "customer_email", skip_serializing_if = "Option::is_none")]
    pub customer_email: Option<String>,
    /// Customer name: prefers payment's customer, falls back to session
    #[serde(rename = "customer_name", skip_serializing_if = "Option::is_none")]
    pub customer_name: Option<String>,
    /// Id of the checkout session
    #[serde(rename = "id")]
    pub id: String,
    /// Id of the payment created by the checkout sessions.  Null if checkout sessions is still at the details collection stage.
    #[serde(rename = "payment_id", skip_serializing_if = "Option::is_none")]
    pub payment_id: Option<String>,
    /// status of the payment.  Null if checkout sessions is still at the details collection stage.
    #[serde(rename = "payment_status", skip_serializing_if = "Option::is_none")]
    pub payment_status: Option<models::IntentStatus>,
}

impl GetCheckoutSessionsStatus {
    pub fn new(created_at: String, id: String) -> GetCheckoutSessionsStatus {
        GetCheckoutSessionsStatus {
            created_at,
            customer_email: None,
            customer_name: None,
            id,
            payment_id: None,
            payment_status: None,
        }
    }
}