pub struct Subscription {
pub canceled_at: Option<Timestamp>,
pub country: Option<String>,
pub current_period_end: Timestamp,
pub current_period_start: Timestamp,
pub entitlement_ids: Vec<Id<EntitlementMarker>>,
pub id: Id<SubscriptionMarker>,
pub renewal_sku_ids: Option<Vec<Id<SkuMarker>>>,
pub sku_ids: Vec<Id<SkuMarker>>,
pub status: SubscriptionStatus,
pub user_id: Id<UserMarker>,
}Expand description
Subscriptions in Discord represent a user making recurring payments for at least one SKU over an ongoing period. Successful payments grant the user access to entitlements associated with the SKU.
Fields§
§canceled_at: Option<Timestamp>When the subscription was canceled.
country: Option<String>ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope.
current_period_end: TimestampEnd of the current subscription period.
current_period_start: TimestampStart of the current subscription period.
entitlement_ids: Vec<Id<EntitlementMarker>>List of entitlements granted for this subscription.
id: Id<SubscriptionMarker>ID of the subscription.
renewal_sku_ids: Option<Vec<Id<SkuMarker>>>List of SKUs that this user will be subscribed to at renewal.
sku_ids: Vec<Id<SkuMarker>>List of SKUs subscribed to.
status: SubscriptionStatusCurrent status of the subscription.
user_id: Id<UserMarker>ID of the user who is subscribed.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§impl Debug for Subscription
impl Debug for Subscription
Source§impl<'de> Deserialize<'de> for Subscription
impl<'de> Deserialize<'de> for Subscription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Subscription
Source§impl Hash for Subscription
impl Hash for Subscription
Source§impl PartialEq for Subscription
impl PartialEq for Subscription
Source§impl Serialize for Subscription
impl Serialize for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more