[][src]Struct libstripe::resources::billing::subscriptions::Subscription

pub struct Subscription {
    pub id: String,
    pub object: Object,
    pub application_fee_percent: Option<i32>,
    pub billing: SubscriptionBilling,
    pub billing_cycle_anchor: i64,
    pub billing_thresholds: Option<BillingThresholds>,
    pub cancel_at_period_end: bool,
    pub canceled_at: Option<i64>,
    pub collection_method: Option<String>,
    pub cancel_at: Option<i64>,
    pub created: i64,
    pub current_period_end: i64,
    pub current_period_start: i64,
    pub customer: Expandable<Customer>,
    pub days_until_due: Option<i64>,
    pub default_payment_method: Option<Expandable<PaymentMethods>>,
    pub default_source: Option<Expandable<PaymentSource>>,
    pub default_tax_rates: Vec<Expandable<TaxRate>>,
    pub discount: Option<Discount>,
    pub ended_at: Option<i64>,
    pub items: List<SubscriptionItems>,
    pub livemode: bool,
    pub latest_invoice: Expandable<Invoice>,
    pub metadata: HashMap<String, String>,
    pub plan: Plans,
    pub quantity: i64,
    pub schedule: Option<Expandable<SubscriptionSchedules>>,
    pub start: i64,
    pub status: SubscriptionStatus,
    pub tax_percent: Option<f64>,
    pub trial_end: Option<i64>,
    pub trial_start: Option<i64>,
}

Fields

id: Stringobject: Objectapplication_fee_percent: Option<i32>billing: SubscriptionBillingbilling_cycle_anchor: i64billing_thresholds: Option<BillingThresholds>cancel_at_period_end: boolcanceled_at: Option<i64>collection_method: Option<String>cancel_at: Option<i64>created: i64current_period_end: i64current_period_start: i64customer: Expandable<Customer>days_until_due: Option<i64>default_payment_method: Option<Expandable<PaymentMethods>>default_source: Option<Expandable<PaymentSource>>default_tax_rates: Vec<Expandable<TaxRate>>discount: Option<Discount>ended_at: Option<i64>items: List<SubscriptionItems>livemode: boollatest_invoice: Expandable<Invoice>metadata: HashMap<String, String>plan: Plansquantity: i64schedule: Option<Expandable<SubscriptionSchedules>>start: i64status: SubscriptionStatustax_percent: Option<f64>trial_end: Option<i64>trial_start: Option<i64>

Methods

impl Subscription[src]

pub fn create<B: Serialize>(client: &Client, param: B) -> Result<Self>[src]

pub fn retrieve(client: &Client, id: &str) -> Result<Self>[src]

pub fn update<B: Serialize>(client: &Client, id: &str, param: B) -> Result<Self>[src]

pub fn cancel<B: Serialize>(client: &Client, id: &str, param: B) -> Result<Self>[src]

pub fn list<B: Serialize>(client: &Client, param: B) -> Result<List<Self>>[src]

Trait Implementations

impl PartialEq<Subscription> for Subscription[src]

impl Debug for Subscription[src]

impl Serialize for Subscription[src]

impl<'de> Deserialize<'de> for Subscription[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err