use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Channel {
#[serde(rename = "ID")]
pub id: String,
#[serde(rename = "PaymentMethodCategory")]
pub payment_method_category: String,
#[serde(rename = "PaymentMethodType")]
pub payment_method_type: String,
#[serde(rename = "FiatCurrency")]
pub fiat_currency: String,
#[serde(rename = "Country")]
pub country: String,
#[serde(rename = "Calculated", skip_serializing_if = "Option::is_none")]
pub calculated: Option<Box<models::ChannelCalculated>>,
#[serde(rename = "Limits")]
pub limits: Box<models::ChannelLimits>,
#[serde(rename = "Rate")]
pub rate: String,
#[serde(rename = "PaymentMethods", skip_serializing_if = "Option::is_none")]
pub payment_methods: Option<Vec<models::PaymentMethodDisplay>>,
#[serde(rename = "ProcessingSeconds")]
pub processing_seconds: i32,
#[serde(rename = "ProcessingTier", skip_serializing_if = "Option::is_none")]
pub processing_tier: Option<models::ProcessingTier>,
#[serde(rename = "FormSchema", skip_serializing_if = "Option::is_none")]
pub form_schema: Option<Box<models::FormSchema>>,
}
impl Channel {
pub fn new(
id: String,
payment_method_category: String,
payment_method_type: String,
fiat_currency: String,
country: String,
limits: models::ChannelLimits,
rate: String,
processing_seconds: i32,
) -> Channel {
Channel {
id,
payment_method_category,
payment_method_type,
fiat_currency,
country,
calculated: None,
limits: Box::new(limits),
rate,
payment_methods: None,
processing_seconds,
processing_tier: None,
form_schema: None,
}
}
}