prawn 0.0.3

Rust Client for the Tidal API providing comprehensive API coverag, and easy OAuth management
Documentation
/*
 * TIDAL API
 *
 * The TIDAL API is a [JSON:API](https://jsonapi.org/)–compliant web API that exposes TIDAL’s music, metadata, and user-related functionality through a consistent, resource-oriented design. More information and API management are available at [developer.tidal.com](developer.tidal.com)
 *
 * The version of the OpenAPI document: 1.0.36
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct StripeConnectionsCreateOperationPayloadDataAttributes {
    /// Integration type for Stripe onboarding
    #[serde(rename = "integrationType")]
    pub integration_type: IntegrationType,
    /// REDIRECT only: URL to redirect to if seller drops from onboarding
    #[serde(rename = "refreshUrl", skip_serializing_if = "Option::is_none")]
    pub refresh_url: Option<String>,
    /// REDIRECT only: URL to redirect to after completed onboarding
    #[serde(rename = "returnUrl", skip_serializing_if = "Option::is_none")]
    pub return_url: Option<String>,
}

impl StripeConnectionsCreateOperationPayloadDataAttributes {
    pub fn new(integration_type: IntegrationType) -> StripeConnectionsCreateOperationPayloadDataAttributes {
        StripeConnectionsCreateOperationPayloadDataAttributes {
            integration_type,
            refresh_url: None,
            return_url: None,
        }
    }
}
/// Integration type for Stripe onboarding
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IntegrationType {
    #[serde(rename = "REDIRECT")]
    Redirect,
    #[serde(rename = "EMBEDDED")]
    Embedded,
}

impl Default for IntegrationType {
    fn default() -> IntegrationType {
        Self::Redirect
    }
}