pub struct Subscription<C = Customer> {Show 14 fields
pub id: String,
pub customer: C,
pub plan: Plan,
pub start_date: OffsetDateTime,
pub end_date: Option<OffsetDateTime>,
pub status: Option<SubscriptionStatus>,
pub current_billing_period_start_date: Option<OffsetDateTime>,
pub current_billing_period_end_date: Option<OffsetDateTime>,
pub active_plan_phase_order: Option<i64>,
pub fixed_fee_quantity_schedule: Vec<SubscriptionFixedFee>,
pub net_terms: i64,
pub auto_collection: bool,
pub default_invoice_memo: String,
pub created_at: OffsetDateTime,
}Expand description
An Orb subscription.
Fields§
§id: StringThe Orb-assigned unique identifier for the subscription.
customer: CThe customer associated with this subscription.
plan: PlanThe plan associated with this subscription.
start_date: OffsetDateTimeThe date at which Orb starts billing for this subscription.
end_date: Option<OffsetDateTime>The date at which Orb stops billing for this subscription.
status: Option<SubscriptionStatus>The status of the subscription.
current_billing_period_start_date: Option<OffsetDateTime>The start of the current billing period if the subscription is currently active.
current_billing_period_end_date: Option<OffsetDateTime>The end of the current billing period if the subscription is currently active.
active_plan_phase_order: Option<i64>The current plan phase that is active, if the subscription’s plan has phases.
fixed_fee_quantity_schedule: Vec<SubscriptionFixedFee>List of all fixed fee quantities associated with this subscription.
net_terms: i64Determines the difference between the invoice issue date and the date that they are due.
A value of zero indicates that the invoice is due on issue, whereas a value of 30 represents that the customer has a month to pay the invoice.
auto_collection: boolDetermines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date.
If None, the value is determined by the plan configuration.
default_invoice_memo: StringDetermines the default memo on this subscription’s invoices.
If None, the value is determined by the plan configuration.
created_at: OffsetDateTimeThe time at which the subscription was created.
Trait Implementations§
Source§impl<C: Clone> Clone for Subscription<C>
impl<C: Clone> Clone for Subscription<C>
Source§fn clone(&self) -> Subscription<C>
fn clone(&self) -> Subscription<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C: Debug> Debug for Subscription<C>
impl<C: Debug> Debug for Subscription<C>
Source§impl<'de, C> Deserialize<'de> for Subscription<C>where
C: Deserialize<'de>,
impl<'de, C> Deserialize<'de> for Subscription<C>where
C: Deserialize<'de>,
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>,
Source§impl<C: Hash> Hash for Subscription<C>
impl<C: Hash> Hash for Subscription<C>
Source§impl<C: PartialEq> PartialEq for Subscription<C>
impl<C: PartialEq> PartialEq for Subscription<C>
Source§impl<C> Serialize for Subscription<C>where
C: Serialize,
impl<C> Serialize for Subscription<C>where
C: Serialize,
impl<C: Eq> Eq for Subscription<C>
impl<C> StructuralPartialEq for Subscription<C>
Auto Trait Implementations§
impl<C> Freeze for Subscription<C>where
C: Freeze,
impl<C> RefUnwindSafe for Subscription<C>where
C: RefUnwindSafe,
impl<C> Send for Subscription<C>where
C: Send,
impl<C> Sync for Subscription<C>where
C: Sync,
impl<C> Unpin for Subscription<C>where
C: Unpin,
impl<C> UnwindSafe for Subscription<C>where
C: UnwindSafe,
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.