Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodArgumentsDescription
__construct

object $client (optional) - An instance of Http\Client\HttpClient

object $messageFactory (optional) - An instance of Http\Message\MessageFactory

Class constructor
factory

string $apiToken - The api token needed to access the Paybetr API

object $client (optional) - An instance of Http\Client\HttpClient

object $messageFactory (optional) - An instance of Http\Message\MessageFactory

Static method to construct the class with an API token
getApiToken
Returns the API token
setApiTokenstring $apiToken - The api token needed to access the Paybetr APISets the API token
getCollectionClass
Returns the class used for collections
setCollectionClassstring $class - The class you want to use to handle collectionsSets the class to be used for collections
getResourceClass
Returns the current resource class
setResourceClassstring $class - The class you want to use to handle resourcesSets the current resource class
setClass

string $className - The name of the resource class you want to override

string $class - The class you want to override $className with

Overrides the default classes for resources
getBaseUrl
Returns the base URL for the API
setBaseUrlstring $url - The base URL for the Paybetr APISets the base URL for the API
getUri
Returns the current endpoint
setUristring $uri - The endpoint for the requestSets the current endpoint
getUrl
Returns the full URL for the request
setUrlstring $url - The full URL to useSets the full URL for the request
getQuery
Returns the current query parameters
setQueryarray $query - The query parameters to use for the requestOverrides the current query parameters with new ones
addQuery

string $query - The query parameter

string $value - The value of the query parameter

Adds a query parameter to the existing ones
clearQuery
Clears the query parameters
filter

string $column - The column to filter the request on

string $value - The value of the filter

Adds a column filter to the request
sortstring $sort - The value of the sort queryAdds a sort query to the request
limitint $limit - The number of records to returnAdds a limit query to the request
reset
Resets the class. Clears the queries and the URI
address
Sets the address class as the current resource class
availableTriggers
Sets the availableTriggers class as the current resource class
balance
Sets the balance class as the current resource class
currency
Sets the currency class as the current resource class
exchange
Sets the exchange class as the current resource class
transaction
Sets the transaction class as the current resource class
trigger
Sets the trigger class as the current resource class
webhook
Sets the webhook class as the current resource class
withdrawal
Sets the withdrawal class as the current resource class
getarray $arguments - Array of arguments to pass to the requestPerforms a request to get all records
firstarray $arguments - Array of arguments to pass to the requestPerforms a request to get the first record
lastarray $arguments - Array of arguments to pass to the requestPerforms a request to get the last record
findstring $identifier - The identifier for the record you want to findPerforms a request to find a single record
createarray $attributes - Array of attributes to use in the create requestPerforms a request to create a resource (not implemented on all resources)
updatearray $attributes - Array of attributes to use in the update requestPerforms a request to update a resource (not implemented on all resources)
delete
Performs a request to delete a resource (not implemented on all resources)
request

string $method - The HTTP method for the request

array $body - Array of data to send with the request

Sends a generic request to the API

...