bitwarden_api_api/models/
bit_pay_invoice_request_model.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BitPayInvoiceRequestModel {
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<uuid::Uuid>,
#[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")]
pub organization_id: Option<uuid::Uuid>,
#[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
pub provider_id: Option<uuid::Uuid>,
#[serde(rename = "credit", skip_serializing_if = "Option::is_none")]
pub credit: Option<bool>,
#[serde(rename = "amount")]
pub amount: f64,
#[serde(rename = "returnUrl", skip_serializing_if = "Option::is_none")]
pub return_url: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
}
impl BitPayInvoiceRequestModel {
pub fn new(amount: f64) -> BitPayInvoiceRequestModel {
BitPayInvoiceRequestModel {
user_id: None,
organization_id: None,
provider_id: None,
credit: None,
amount,
return_url: None,
name: None,
email: None,
}
}
}