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 BrandResponse {
    #[serde(rename = "brand_id")]
    pub brand_id: String,
    #[serde(rename = "business_id")]
    pub business_id: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    #[serde(rename = "image", skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Incase the brand verification fails or is put on hold
    #[serde(rename = "reason_for_hold", skip_serializing_if = "Option::is_none")]
    pub reason_for_hold: Option<String>,
    #[serde(rename = "statement_descriptor")]
    pub statement_descriptor: String,
    #[serde(rename = "support_email", skip_serializing_if = "Option::is_none")]
    pub support_email: Option<String>,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "verification_enabled")]
    pub verification_enabled: bool,
    #[serde(rename = "verification_status")]
    pub verification_status: models::BrandVerificationStatus,
}

impl BrandResponse {
    pub fn new(brand_id: String, business_id: String, enabled: bool, statement_descriptor: String, verification_enabled: bool, verification_status: models::BrandVerificationStatus) -> BrandResponse {
        BrandResponse {
            brand_id,
            business_id,
            description: None,
            enabled,
            image: None,
            name: None,
            reason_for_hold: None,
            statement_descriptor,
            support_email: None,
            url: None,
            verification_enabled,
            verification_status,
        }
    }
}