\Ezypay\ResourceInvoice

Class Invoice

Summary

Methods
Properties
Constants
__construct()
findAll()
findById()
getNext()
create()
update()
refund()
markAsPaid()
delete()
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

findAll()

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

Returns a list of Invoices.Merchant ID, customer ID, subscription ID are optional fields but they are good filters for setting the scope of query.

Parameters

array $data

Returns

\Ezypay\Result\ResultProducer

findById()

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

Get an invoice to retrieve detailed information about its payments and statuses.

Parameters

$id

string The ID of the invoice.

Returns

\Ezypay\Result\ResultProducer

getNext()

getNext(  $customerId,   $subscriptionId) : \Ezypay\Result\ResultProducer

Get the next invoice to retrieve detailed information about its payments and statuses.

Parameters

$customerId

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

$subscriptionId

string The ID of the subscription.

Returns

\Ezypay\Result\ResultProducer

create()

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

Creates an ad-hoc invoice that is not part of a customers subscription.

Parameters

array $data

The invoice array. Refer to request body schema (see link)

Returns

\Ezypay\Result\ResultProducer

update()

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

Updates an existing invoice information. If the invoice has already been paid, any update request will be rejected.

Parameters

$id

string The ID of the invoice.

array $data

The invoice object. Refer to request body schema (see link)

Returns

\Ezypay\Result\ResultProducer

refund()

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

Invoice that has already been paid can be refund in full using this End Point. Note that if an Invoice that is not of success status, can not be refund.

Parameters

$id

string The ID of the invoice

Returns

\Ezypay\Result\ResultProducer

markAsPaid()

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

You can mark the particular Invoice as paid which you have collected offline.

Parameters

$id

string The ID of the invoice.

Returns

\Ezypay\Result\ResultProducer

delete()

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

Write-Off an existing Invoice from billing.

Parameters

$id

string The ID of the invoice

Returns

\Ezypay\Result\ResultProducer

settings()

settings(array  $settings) 

Parameters

array $settings

connector settings

setResourceType()

setResourceType(  $resourceType) 

Parameters

$resourceType

string Name of resource