PHP Class Cartalyst\Stripe\Api\Subscriptions

Inheritance: extends Api
Show file Open project: cartalyst/stripe

Public Methods

Method Description
all ( string $customerId, array $parameters = [] ) : array Lists all subscriptions from the given customer.
applyDiscount ( string $customerId, string $subscriptionId, string $couponId ) : array Applies the given discount on the given subscription.
cancel ( string $customerId, string $subscriptionId, boolean $atPeriodEnd = false ) : array Cancels an existing subscription from the given customer.
create ( string $customerId, array $parameters = [] ) : array Creates a new subscription on the given customer.
deleteDiscount ( string $customerId, string $subscriptionId ) : array Deletes an existing subscription discount.
find ( string $customerId, string $subscriptionId ) : array Retrieves an existing subscription from the given customer.
reactivate ( string $customerId, string $subscriptionId, array $attributes = [] ) : array Reactivates an existing canceled subscription from the given customer.
update ( string $customerId, string $subscriptionId, array $parameters = [] ) : array Updates an existing subscription from the given customer.

Method Details

all() public method

Lists all subscriptions from the given customer.
public all ( string $customerId, array $parameters = [] ) : array
$customerId string
$parameters array
return array

applyDiscount() public method

Applies the given discount on the given subscription.
public applyDiscount ( string $customerId, string $subscriptionId, string $couponId ) : array
$customerId string
$subscriptionId string
$couponId string
return array

cancel() public method

Cancels an existing subscription from the given customer.
public cancel ( string $customerId, string $subscriptionId, boolean $atPeriodEnd = false ) : array
$customerId string
$subscriptionId string
$atPeriodEnd boolean
return array

create() public method

Creates a new subscription on the given customer.
public create ( string $customerId, array $parameters = [] ) : array
$customerId string
$parameters array
return array

deleteDiscount() public method

Deletes an existing subscription discount.
public deleteDiscount ( string $customerId, string $subscriptionId ) : array
$customerId string
$subscriptionId string
return array

find() public method

Retrieves an existing subscription from the given customer.
public find ( string $customerId, string $subscriptionId ) : array
$customerId string
$subscriptionId string
return array

reactivate() public method

Reactivates an existing canceled subscription from the given customer.
public reactivate ( string $customerId, string $subscriptionId, array $attributes = [] ) : array
$customerId string
$subscriptionId string
$attributes array
return array

update() public method

Updates an existing subscription from the given customer.
public update ( string $customerId, string $subscriptionId, array $parameters = [] ) : array
$customerId string
$subscriptionId string
$parameters array
return array