pub struct Subscriptions { /* private fields */ }Implementations§
Source§impl Subscriptions
impl Subscriptions
pub fn create_plan( &self, name: String, price: f64, interval: String, interval_count: Option<i32>, trial_days: Option<i32>, ) -> PhpResult<SubscriptionPlan>
pub fn get_plan(&self, id: String) -> PhpResult<Option<SubscriptionPlan>>
pub fn list_plans(&self) -> PhpResult<Vec<SubscriptionPlan>>
pub fn subscribe( &self, plan_id: String, customer_id: String, ) -> PhpResult<Subscription>
pub fn get(&self, id: String) -> PhpResult<Option<Subscription>>
pub fn list(&self) -> PhpResult<Vec<Subscription>>
pub fn pause(&self, id: String) -> PhpResult<Subscription>
pub fn resume(&self, id: String) -> PhpResult<Subscription>
pub fn cancel( &self, id: String, at_period_end: Option<bool>, ) -> PhpResult<Subscription>
pub fn for_customer(&self, customer_id: String) -> PhpResult<Vec<Subscription>>
pub fn is_active(&self, id: String) -> PhpResult<bool>
Trait Implementations§
Source§impl Clone for Subscriptions
impl Clone for Subscriptions
Source§fn clone(&self) -> Subscriptions
fn clone(&self) -> Subscriptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> FromZendObject<'a> for &'a Subscriptions
impl<'a> FromZendObject<'a> for &'a Subscriptions
Source§fn from_zend_object(obj: &'a ZendObject) -> Result<Self>
fn from_zend_object(obj: &'a ZendObject) -> Result<Self>
Extracts
Self from the source ZendObject.Source§impl<'a> FromZendObjectMut<'a> for &'a mut Subscriptions
impl<'a> FromZendObjectMut<'a> for &'a mut Subscriptions
Source§fn from_zend_object_mut(obj: &'a mut ZendObject) -> Result<Self>
fn from_zend_object_mut(obj: &'a mut ZendObject) -> Result<Self>
Extracts
Self from the source ZendObject.Source§impl<'a> FromZval<'a> for &'a Subscriptions
impl<'a> FromZval<'a> for &'a Subscriptions
Source§impl<'a> FromZvalMut<'a> for &'a mut Subscriptions
impl<'a> FromZvalMut<'a> for &'a mut Subscriptions
Source§impl IntoZendObject for Subscriptions
impl IntoZendObject for Subscriptions
Source§fn into_zend_object(self) -> Result<ZBox<ZendObject>>
fn into_zend_object(self) -> Result<ZBox<ZendObject>>
Attempts to convert
self into a Zend object.Source§impl IntoZval for Subscriptions
impl IntoZval for Subscriptions
Source§impl RegisteredClass for Subscriptions
impl RegisteredClass for Subscriptions
Source§const CLASS_NAME: &'static str = "StateSet\\Subscriptions"
const CLASS_NAME: &'static str = "StateSet\\Subscriptions"
PHP class name of the registered class.
Source§const CONSTRUCTOR: Option<ConstructorMeta<Self>> = None
const CONSTRUCTOR: Option<ConstructorMeta<Self>> = None
Optional class constructor.
Source§fn get_metadata() -> &'static ClassMetadata<Self>
fn get_metadata() -> &'static ClassMetadata<Self>
Returns a reference to the class metadata, which stores the class entry
and handlers. Read more
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