use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EntitlementGrantRevokedPostRequest {
#[serde(rename = "business_id")]
pub business_id: String,
#[serde(rename = "data")]
pub data: Box<models::EntitlementGrantResponse>,
#[serde(rename = "timestamp")]
pub timestamp: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl EntitlementGrantRevokedPostRequest {
pub fn new(business_id: String, data: models::EntitlementGrantResponse, timestamp: chrono::DateTime<chrono::FixedOffset>, r#type: Type) -> EntitlementGrantRevokedPostRequest {
EntitlementGrantRevokedPostRequest {
business_id,
data: Box::new(data),
timestamp,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "entitlement_grant.revoked")]
EntitlementGrantRevoked,
}
impl Default for Type {
fn default() -> Type {
Self::EntitlementGrantRevoked
}
}