Skip to main content

artifacts/models/
gem_shop_subscription_response_data_schema.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct GemShopSubscriptionResponseDataSchema {
7    /// Whether the account is now a member.
8    #[serde(rename = "member")]
9    pub member: bool,
10    /// Membership expiration date.
11    #[serde(rename = "member_expiration")]
12    pub member_expiration: String,
13    /// Remaining gem balance.
14    #[serde(rename = "gems")]
15    pub gems: i32,
16    /// Gem cost of the purchase.
17    #[serde(rename = "cost")]
18    pub cost: i32,
19}
20
21impl GemShopSubscriptionResponseDataSchema {
22    pub fn new(
23        member: bool,
24        member_expiration: String,
25        gems: i32,
26        cost: i32,
27    ) -> GemShopSubscriptionResponseDataSchema {
28        GemShopSubscriptionResponseDataSchema {
29            member,
30            member_expiration,
31            gems,
32            cost,
33        }
34    }
35}