use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaymentMethod {
#[serde(rename = "ID")]
pub id: String,
#[serde(rename = "CustomerID", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "Country")]
pub country: String,
#[serde(rename = "PaymentMethodCategory")]
pub payment_method_category: String,
#[serde(rename = "DisplayDetails")]
pub display_details: Box<models::PaymentMethodDisplayDetails>,
}
impl PaymentMethod {
pub fn new(
id: String,
country: String,
payment_method_category: String,
display_details: models::PaymentMethodDisplayDetails,
) -> PaymentMethod {
PaymentMethod {
id,
customer_id: None,
country,
payment_method_category,
display_details: Box::new(display_details),
}
}
}