use serde::{Deserialize, Serialize};
use super::{applied_coupon::AppliedCoupon, subscription_coupon::SubscriptionCoupon};
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub struct AppliedCouponDetailed {
pub applied_coupon: AppliedCoupon,
pub coupon: SubscriptionCoupon,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
impl AppliedCouponDetailed {
#[must_use]
pub fn new(applied_coupon: AppliedCoupon, coupon: SubscriptionCoupon) -> Self {
Self {
applied_coupon,
coupon,
extra: serde_json::Map::new(),
}
}
}