\Ezypay\ResourcePlan

Class Plan

Resource for plans

Summary

Methods
Properties
Constants
__construct()
findAll()
findById()
create()
update()
deactivate()
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) 

Plan constructor.

Parameters

\Ezypay\Contract\IDriver $connector
$validation

ValidationBase

findAll()

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

Get list of available plan.

Parameters

array $data

Returns

\Ezypay\Result\ResultProducer

findById()

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

Get an existing plan with a given planId.

Parameters

$id

Returns

\Ezypay\Result\ResultProducer

create()

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

Creating a new plans can be done easily via the dashboard page. Alternatively, plans creation are available through API if creation of plans needs to be done on the fly.

Parameters

array $data

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

Returns

\Ezypay\Result\ResultProducer

update()

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

Update the details of an existing plan, any subscriptions that are linked to the existing plans would not be affected by this change.

Parameters

$id

string The ID of the plan.

array $data

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

Returns

\Ezypay\Result\ResultProducer

deactivate()

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

Inactivate an existing plan. That that is marked as Inactive would disable it's use from Subscriptions and Online Signup.

Parameters

$id

string The ID of the plan.

Returns

\Ezypay\Result\ResultProducer

settings()

settings(array  $settings) 

Parameters

array $settings

connector settings

setResourceType()

setResourceType(  $resourceType) 

Parameters

$resourceType

string Name of resource