pub struct Subscription {
pub id: String,
pub subscriber: Subscriber,
pub plan_id: String,
pub next_plan_id: Option<String>,
pub status: SubscriptionStatus,
pub channel: Channel,
pub period_start: u64,
pub period_end: u64,
pub cancel_at_period_end: bool,
pub created_at: u64,
pub updated_at: u64,
}Fields§
§id: String§subscriber: Subscriber§plan_id: String§next_plan_id: Option<String>Set by crate::Billing::change_plan; becomes plan_id when the next
invoice is paid.
status: SubscriptionStatus§channel: ChannelHow the customer paid last time, and how the renewal will be offered.
period_start: u64Unix seconds. Both zero until the first invoice is paid.
period_end: u64§cancel_at_period_end: boolSet by crate::Billing::cancel: no renewal is raised, and the
subscription ends when the period does.
created_at: u64§updated_at: u64Implementations§
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§impl Debug for Subscription
impl Debug for Subscription
impl Eq for Subscription
Source§impl PartialEq for Subscription
impl PartialEq 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