dodopayments_rust 2.2.2

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 CreateSessionResponse {
    /// Checkout url (None when payment_method_id is provided)
    #[serde(rename = "checkout_url", skip_serializing_if = "Option::is_none")]
    pub checkout_url: Option<String>,
    /// The ID of the created checkout session
    #[serde(rename = "session_id")]
    pub session_id: String,
}

impl CreateSessionResponse {
    pub fn new(session_id: String) -> CreateSessionResponse {
        CreateSessionResponse {
            checkout_url: None,
            session_id,
        }
    }
}