CreateSubscriptionRequest

Struct CreateSubscriptionRequest 

Source
pub struct CreateSubscriptionRequest<'a> {
    pub customer_id: CustomerId<'a>,
    pub plan_id: PlanId<'a>,
    pub start_date: Option<OffsetDateTime>,
    pub external_marketplace: Option<SubscriptionExternalMarketplaceRequest<'a>>,
    pub align_billing_with_subscription_start_date: Option<bool>,
    pub minimum_amount: Option<&'a str>,
    pub net_terms: Option<i64>,
    pub auto_collection: Option<bool>,
    pub default_invoice_memo: Option<&'a str>,
    pub idempotency_key: Option<&'a str>,
}
Expand description

An Orb subscription.

Fields§

§customer_id: CustomerId<'a>

An optional user-defined ID for this customer resource, used throughout the system as an alias for this customer.

§plan_id: PlanId<'a>

The plan that the customer should be subscribed to.

The plan determines the pricing and the cadence of the subscription.

§start_date: Option<OffsetDateTime>

The date at which Orb should start billing for the subscription, localized ot the customer’s timezone.

If None, defaults to the current date in the customer’s timezone.

§external_marketplace: Option<SubscriptionExternalMarketplaceRequest<'a>>

The name of the external marketplace that the subscription is attached to.

§align_billing_with_subscription_start_date: Option<bool>

Whether to align billing periods with the subscription’s start date.

If None, the value is determined by the plan configuration.

§minimum_amount: Option<&'a str>

The subscription’s override minimum amount for the plan.

§net_terms: Option<i64>

The subscription’s override minimum amount for the plan.

§auto_collection: Option<bool>

Determines 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: Option<&'a str>

Determines the default memo on this subscription’s invoices.

If None, the value is determined by the plan configuration.

§idempotency_key: Option<&'a str>

An idempotency key can ensure that if the same request comes in multiple times in a 48-hour period, only one makes changes.

Trait Implementations§

Source§

impl<'a> Clone for CreateSubscriptionRequest<'a>

Source§

fn clone(&self) -> CreateSubscriptionRequest<'a>

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

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for CreateSubscriptionRequest<'a>

Source§

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

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

impl<'a> Default for CreateSubscriptionRequest<'a>

Source§

fn default() -> CreateSubscriptionRequest<'a>

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

impl<'a> Hash for CreateSubscriptionRequest<'a>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> PartialEq for CreateSubscriptionRequest<'a>

Source§

fn eq(&self, other: &CreateSubscriptionRequest<'a>) -> 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<'a> Serialize for CreateSubscriptionRequest<'a>

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<'a> Eq for CreateSubscriptionRequest<'a>

Source§

impl<'a> StructuralPartialEq for CreateSubscriptionRequest<'a>

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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