\Ezypay\ResourcePaymentMethod

Class PaymentMethod

Summary

Methods
Properties
Constants
__construct()
findAll()
findById()
findDefault()
create()
setDefault()
remove()
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) 

PaymentMethod constructor.

Parameters

\Ezypay\Contract\IDriver $connector
$validation

ValidationBase

findAll()

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

Retrieves the list of available payment method details of an existing customer.

Parameters

array $data

Returns

\Ezypay\Result\ResultProducer

findById()

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

Retrieves a particular payment method details of an existing customer.

Parameters

$id

string The ID of the payment method.

Returns

\Ezypay\Result\ResultProducer

findDefault()

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

Retrieves the default payment method details of an existing customer.

Parameters

array $data

Returns

\Ezypay\Result\ResultProducer

create()

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

Creates a new bank payment method for an existing customer. If the payment method's owner has no default payment method specified, then the new bank account will become the default. However, if the owner already has a default then it will not change unless setAsDefault flag is set to true.

Parameters

array $data

The bank account data. Refer to request body schema (see link).

Returns

\Ezypay\Result\ResultProducer

setDefault()

setDefault(  $paymentMethodId,   $customerId) : \Ezypay\Result\ResultProducer

You can switch default payment method for an existing customer.

Parameters

$paymentMethodId

string The ID of the payment method.

$customerId

string The ID of the customer. A unique identifier generated by the system.

Returns

\Ezypay\Result\ResultProducer

remove()

remove(  $paymentMethodId,   $customerId) : \Ezypay\Result\ResultProducer

You can remove an obsolete Payment Method which belongs to a customer.

Parameters

$paymentMethodId

string The ID of the payment method.

$customerId

string The ID of the customer. A unique identifier generated by the system.

Returns

\Ezypay\Result\ResultProducer

settings()

settings(array  $settings) 

Parameters

array $settings

connector settings

setResourceType()

setResourceType(  $resourceType) 

Parameters

$resourceType

string Name of resource