pub struct Subscriptions { /* private fields */ }Implementations§
Source§impl Subscriptions
impl Subscriptions
Sourcepub fn create_plan(&self, input: JsValue) -> Result<JsValue, JsValue>
pub fn create_plan(&self, input: JsValue) -> Result<JsValue, JsValue>
Create a subscription plan.
Sourcepub fn list_plans(&self) -> Result<JsValue, JsValue>
pub fn list_plans(&self) -> Result<JsValue, JsValue>
List all subscription plans.
Sourcepub fn activate_plan(&self, id: &str) -> Result<JsValue, JsValue>
pub fn activate_plan(&self, id: &str) -> Result<JsValue, JsValue>
Activate a subscription plan.
Sourcepub fn subscribe(&self, input: JsValue) -> Result<JsValue, JsValue>
pub fn subscribe(&self, input: JsValue) -> Result<JsValue, JsValue>
Subscribe a customer to a plan.
Sourcepub fn pause(
&self,
id: &str,
reason: Option<String>,
) -> Result<JsValue, JsValue>
pub fn pause( &self, id: &str, reason: Option<String>, ) -> Result<JsValue, JsValue>
Pause a subscription.
Sourcepub fn cancel(
&self,
id: &str,
at_period_end: Option<bool>,
reason: Option<String>,
) -> Result<JsValue, JsValue>
pub fn cancel( &self, id: &str, at_period_end: Option<bool>, reason: Option<String>, ) -> Result<JsValue, JsValue>
Cancel a subscription.
Sourcepub fn skip_next_cycle(
&self,
id: &str,
reason: Option<String>,
) -> Result<JsValue, JsValue>
pub fn skip_next_cycle( &self, id: &str, reason: Option<String>, ) -> Result<JsValue, JsValue>
Skip the next billing cycle.
Sourcepub fn create_billing_cycle(
&self,
subscription_id: &str,
) -> Result<JsValue, JsValue>
pub fn create_billing_cycle( &self, subscription_id: &str, ) -> Result<JsValue, JsValue>
Create a billing cycle for a subscription.
Sourcepub fn list_billing_cycles(
&self,
subscription_id: Option<String>,
) -> Result<JsValue, JsValue>
pub fn list_billing_cycles( &self, subscription_id: Option<String>, ) -> Result<JsValue, JsValue>
List billing cycles for a subscription.
Sourcepub fn get_billing_cycle(&self, id: &str) -> Result<JsValue, JsValue>
pub fn get_billing_cycle(&self, id: &str) -> Result<JsValue, JsValue>
Get a billing cycle by ID.
Sourcepub fn get_events(&self, subscription_id: &str) -> Result<JsValue, JsValue>
pub fn get_events(&self, subscription_id: &str) -> Result<JsValue, JsValue>
Get events for a subscription.
Sourcepub fn count_plans(&self) -> u32
pub fn count_plans(&self) -> u32
Count subscription plans.
Sourcepub fn count_subscriptions(&self) -> u32
pub fn count_subscriptions(&self) -> u32
Count subscriptions.
Trait Implementations§
Source§impl From<Subscriptions> for JsValue
impl From<Subscriptions> for JsValue
Source§fn from(value: Subscriptions) -> Self
fn from(value: Subscriptions) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for Subscriptions
impl FromWasmAbi for Subscriptions
Source§impl IntoWasmAbi for Subscriptions
impl IntoWasmAbi for Subscriptions
Source§impl LongRefFromWasmAbi for Subscriptions
impl LongRefFromWasmAbi for Subscriptions
Source§impl OptionFromWasmAbi for Subscriptions
impl OptionFromWasmAbi for Subscriptions
Source§impl OptionIntoWasmAbi for Subscriptions
impl OptionIntoWasmAbi for Subscriptions
Source§impl RefFromWasmAbi for Subscriptions
impl RefFromWasmAbi for Subscriptions
Source§type Anchor = RcRef<Subscriptions>
type Anchor = RcRef<Subscriptions>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for Subscriptions
impl RefMutFromWasmAbi for Subscriptions
Source§impl TryFromJsValue for Subscriptions
impl TryFromJsValue for Subscriptions
Source§impl VectorFromWasmAbi for Subscriptions
impl VectorFromWasmAbi for Subscriptions
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Subscriptions]>
Source§impl VectorIntoWasmAbi for Subscriptions
impl VectorIntoWasmAbi for Subscriptions
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Subscriptions]>) -> Self::Abi
Source§impl WasmDescribeVector for Subscriptions
impl WasmDescribeVector for Subscriptions
impl SupportsConstructor for Subscriptions
impl SupportsInstanceProperty for Subscriptions
impl SupportsStaticProperty for Subscriptions
Auto Trait Implementations§
impl Freeze for Subscriptions
impl !RefUnwindSafe for Subscriptions
impl !Send for Subscriptions
impl !Sync for Subscriptions
impl Unpin for Subscriptions
impl UnsafeUnpin for Subscriptions
impl !UnwindSafe for Subscriptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.