\Ezypay\ResourceSubscription

Class Subscription

Summary

Methods
Properties
Constants
__construct()
findAll()
findById()
create()
preview()
cancel()
update()
No public properties found
No constants found
settings()
addValidator()
setResourceType()
result()
No protected properties found
N/A
No private methods found
$connector
$resourceType
$validation
N/A

Properties

$connector

$connector : 

Type

— IDriver

$resourceType

$resourceType : string

Type

string — defautl object name

$validation

$validation : 

Type

— ValidationBase

Methods

__construct()

__construct(\Ezypay\Contract\IDriver  $connector,   $validation) 

Subscription constructor.

Parameters

\Ezypay\Contract\IDriver $connector
$validation

ValidationBase

findAll()

findAll(array  $data = array()) : \Ezypay\Result\ResultProducer

Retrieves the list of subscription of an existing customer.

Parameters

array $data

Returns

\Ezypay\Result\ResultProducer

findById()

findById(  $id) : \Ezypay\Result\ResultProducer

Retrieves the particular subscription details of an existing customer with the given subscriptionId.

Parameters

$id

string The ID of the subscription.

Returns

\Ezypay\Result\ResultProducer

create()

create(array  $data) : \Ezypay\Result\ResultProducer

Creates a new subscription for an existing customer.

Parameters

array $data

The Subscription data. Refer to Request Body Schema (see link).

Returns

\Ezypay\Result\ResultProducer

preview()

preview(array  $data) : \Ezypay\Result\ResultProducer

Preview a subscription.

Parameters

array $data

The Subscription data. Refer to Request Body Schema (see link).

Returns

\Ezypay\Result\ResultProducer

cancel()

cancel(  $id) : \Ezypay\Result\ResultProducer

You can cancel a customer's subscription and remove all future billing related to the subscription. However, all payment that was failed previously would not be removed and to be resolved separately.

Parameters

$id

string The ID of the subscription.

Returns

\Ezypay\Result\ResultProducer

update()

update(  $id, array  $data) : \Ezypay\Result\ResultProducer

You can change a subscription payment method already on your payment account. It will turn subscription status to active if inactive status is found.

Parameters

$id

string subscription ID

array $data

Returns

\Ezypay\Result\ResultProducer

settings()

settings(array  $settings) 

Parameters

array $settings

connector settings

setResourceType()

setResourceType(  $resourceType) 

Parameters

$resourceType

string Name of resource