Struct Subscription

Source
pub struct Subscription {
Show 36 fields pub id: String, pub created_at: String, pub updated_at: String, pub type: TypeTrue, pub status: StatusTrue, pub credits: String, pub concurrency_counter: f64, pub concurrency_limit_included: f64, pub phone_numbers_counter: Option<f64>, pub phone_numbers_included: Option<f64>, pub concurrency_limit_purchased: f64, pub monthly_charge_schedule_id: Option<f64>, pub monthly_credit_check_schedule_id: Option<f64>, pub stripe_customer_id: Option<String>, pub stripe_payment_method_id: Option<String>, pub slack_support_enabled: Option<bool>, pub slack_channel_id: Option<String>, pub hipaa_enabled: Option<bool>, pub hipaa_common_paper_agreement_id: Option<String>, pub stripe_payment_method_fingerprint: Option<String>, pub stripe_customer_email: Option<String>, pub referred_by_email: Option<String>, pub auto_reload_plan: Option<AutoReloadPlan>, pub minutes_included: Option<f64>, pub minutes_used: Option<f64>, pub minutes_used_next_reset_at: Option<String>, pub minutes_overage_cost: Option<f64>, pub providers_included: Option<Vec<String>>, pub outbound_calls_daily_limit: Option<f64>, pub outbound_calls_counter: Option<f64>, pub outbound_calls_counter_next_reset_at: Option<String>, pub coupon_ids: Option<Vec<String>>, pub coupon_usage_left: Option<String>, pub invoice_plan: Option<InvoicePlan>, pub pci_enabled: Option<bool>, pub pci_common_paper_agreement_id: Option<String>,
}

Fields§

§id: String

This is the unique identifier for the subscription.

§created_at: String

This is the timestamp when the subscription was created.

§updated_at: String

This is the timestamp when the subscription was last updated.

§type: TypeTrue

This is the type / tier of the subscription.

§status: StatusTrue

This is the status of the subscription. Past due subscriptions are subscriptions with past due payments.

§credits: String

This is the number of credits the subscription currently has. Note: This is a string to avoid floating point precision issues.

§concurrency_counter: f64

This is the total number of active calls (concurrency) across all orgs under this subscription.

§concurrency_limit_included: f64

This is the default concurrency limit for the subscription.

§phone_numbers_counter: Option<f64>

This is the number of free phone numbers the subscription has

§phone_numbers_included: Option<f64>

This is the maximum number of free phone numbers the subscription can have

§concurrency_limit_purchased: f64

This is the purchased add-on concurrency limit for the subscription.

§monthly_charge_schedule_id: Option<f64>

This is the ID of the monthly job that charges for subscription add ons and phone numbers.

§monthly_credit_check_schedule_id: Option<f64>

This is the ID of the monthly job that checks whether the credit balance of the subscription is sufficient for the monthly charge.

§stripe_customer_id: Option<String>

This is the Stripe customer ID.

§stripe_payment_method_id: Option<String>

This is the Stripe payment ID.

§slack_support_enabled: Option<bool>

If this flag is true, then the user has purchased slack support.

§slack_channel_id: Option<String>

If this subscription has a slack support subscription, the slack channel’s ID will be stored here.

§hipaa_enabled: Option<bool>

This is the HIPAA enabled flag for the subscription. It determines whether orgs under this subscription have the option to enable HIPAA compliance.

§hipaa_common_paper_agreement_id: Option<String>

This is the ID for the Common Paper agreement outlining the HIPAA contract.

§stripe_payment_method_fingerprint: Option<String>

This is the Stripe fingerprint of the payment method (card). It allows us to detect users who try to abuse our system through multiple sign-ups.

§stripe_customer_email: Option<String>

This is the customer’s email on Stripe.

§referred_by_email: Option<String>

This is the email of the referrer for the subscription.

§auto_reload_plan: Option<AutoReloadPlan>

This is the auto reload plan configured for the subscription.

§minutes_included: Option<f64>

The number of minutes included in the subscription.

§minutes_used: Option<f64>

The number of minutes used in the subscription.

§minutes_used_next_reset_at: Option<String>

This is the timestamp at which the number of monthly free minutes is scheduled to reset at.

§minutes_overage_cost: Option<f64>

The per minute charge on minutes that exceed the included minutes. Enterprise only.

§providers_included: Option<Vec<String>>

The list of providers included in the subscription. Enterprise only.

§outbound_calls_daily_limit: Option<f64>

The maximum number of outbound calls this subscription may make in a day. Resets every night.

§outbound_calls_counter: Option<f64>

The current number of outbound calls the subscription has made in the current day.

§outbound_calls_counter_next_reset_at: Option<String>

This is the timestamp at which the outbound calls counter is scheduled to reset at.

§coupon_ids: Option<Vec<String>>

This is the IDs of the coupons applicable to this subscription.

§coupon_usage_left: Option<String>

This is the number of credits left obtained from a coupon.

§invoice_plan: Option<InvoicePlan>

This is the invoice plan for the subscription.

§pci_enabled: Option<bool>

This is the PCI enabled flag for the subscription. It determines whether orgs under this subscription have the option to enable PCI compliance.

§pci_common_paper_agreement_id: Option<String>

This is the ID for the Common Paper agreement outlining the PCI contract.

Implementations§

Source§

impl Subscription

Source

pub fn new( id: String, created_at: String, updated_at: String, type: TypeTrue, status: StatusTrue, credits: String, concurrency_counter: f64, concurrency_limit_included: f64, concurrency_limit_purchased: f64, ) -> Subscription

Trait Implementations§

Source§

impl Clone for Subscription

Source§

fn clone(&self) -> Subscription

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Subscription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Subscription

Source§

fn default() -> Subscription

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Subscription

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Subscription

Source§

fn eq(&self, other: &Subscription) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Subscription

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Subscription

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,