#[non_exhaustive]pub enum SubscriptionStatus {
Trialing,
Active,
PastDue,
Canceled,
Unpaid,
Incomplete,
IncompleteExpired,
Paused,
Other(String),
}Expand description
Where a recurring subscription stands (issue #589), in the provider’s own
vocabulary — Stripe’s subscription statuses today, plus
Other for one this version does not know.
This is the provider’s word, not an entitlement: a billing module reads it
and decides what access it grants (ADR 0025).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Trialing
In a free trial; the first invoice has not been raised yet.
Active
Paid and current.
PastDue
A renewal payment failed; the provider is still retrying.
Canceled
Ended, by the customer or after collection gave up.
Unpaid
The final invoice went unpaid, after the retries ran out.
Incomplete
Created, but the first payment has not completed yet.
IncompleteExpired
The first payment was never completed in time; the subscription is dead and cannot be revived.
Paused
Paused: billing is suspended and no invoices are raised.
Other(String)
A status this version does not know; the raw value is kept.
Implementations§
Source§impl SubscriptionStatus
impl SubscriptionStatus
Sourcepub fn from_provider(status: &str) -> Self
pub fn from_provider(status: &str) -> Self
Maps a provider status string (Stripe’s spellings) to a status;
anything unknown is kept as SubscriptionStatus::Other.
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
The provider’s status string, the inverse of
from_provider, so a status read
from a provider and written back keeps its spelling.
Trait Implementations§
Source§impl Clone for SubscriptionStatus
impl Clone for SubscriptionStatus
Source§impl Debug for SubscriptionStatus
impl Debug for SubscriptionStatus
impl Eq for SubscriptionStatus
Source§impl PartialEq for SubscriptionStatus
impl PartialEq for SubscriptionStatus
impl StructuralPartialEq for SubscriptionStatus
Auto Trait Implementations§
impl Freeze for SubscriptionStatus
impl RefUnwindSafe for SubscriptionStatus
impl Send for SubscriptionStatus
impl Sync for SubscriptionStatus
impl Unpin for SubscriptionStatus
impl UnsafeUnpin for SubscriptionStatus
impl UnwindSafe for SubscriptionStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.