ContactBankService

This service class contains methods for manipulating a customers ContactBank model.
All public functions are available in the Twig template renderer.

Namespace

IO\Services

Properties
Type Name Description

ContactPaymentRepositoryContract

$contactPaymentRepository

Repository for contacts payment methods

Methods
public __construct($contactPaymentRepository)

ContactBankService constructor.

Parameters

Type

Name

Description

ContactPaymentRepositoryContract

$contactPaymentRepository

Repository for contacts payment methods

public getBanksOfContact($contactId, $columns = [], $perPage = 50):         Collection

Get a list of bank accounts of the contact

Parameters

Type

Name

Description

int

$contactId

Id of the contact

array

$columns

Optional: What columns of the model to return (Default: ['*'])

int

$perPage

Optional: Number of bank accounts per page (Default: 50)

public createContactBank($data):ContactBank

Create a new bank account for a contact and return it

Parameters

Type

Name

Description

array

$data

Data for the ContactBank model

public updateContactBank($data, $contactBankId):ContactBank

Update a ContactBank by id

Parameters

Type

Name

Description

array

$data

The updated data

int

$contactBankId

Id of the ContactBank model to update

public deleteContactBank($contactBankId):bool

Delete a ContactBank

Parameters

Type

Name

Description

int

$contactBankId

Id of the ContactBank model to be deleted

public findContactBankById($contactBankId):ContactBank

Find a ContactBank model by Id

Parameters

Type

Name

Description

int

$contactBankId

Id of ContactBank to find