...
Method | Arguments | Description |
---|---|---|
__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 | |
setApiToken | string $apiToken - The api token needed to access the Paybetr API | Sets the API token |
getCollectionClass | Returns the class used for collections | |
setCollectionClass | string $class - The class you want to use to handle collections | Sets the class to be used for collections |
getResourceClass | Returns the current resource class | |
setResourceClass | string $class - The class you want to use to handle resources | Sets 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 | |
setBaseUrl | string $url - The base URL for the Paybetr API | Sets the base URL for the API |
getUri | Returns the current endpoint | |
setUri | string $uri - The endpoint for the request | Sets the current endpoint |
getUrl | Returns the full URL for the request | |
setUrl | string $url - The full URL to use | Sets the full URL for the request |
getQuery | Returns the current query parameters | |
setQuery | array $query - The query parameters to use for the request | Overrides 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 |
sort | string $sort - The value of the sort query | Adds a sort query to the request |
limit | int $limit - The number of records to return | Adds 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 | |
get | array $arguments - Array of arguments to pass to the request | Performs a request to get all records |
first | array $arguments - Array of arguments to pass to the request | Performs a request to get the first record |
last | array $arguments - Array of arguments to pass to the request | Performs a request to get the last record |
find | string $identifier - The identifier for the record you want to find | Performs a request to find a single record |
create | array $attributes - Array of attributes to use in the create request | Performs a request to create a resource (not implemented on all resources) |
update | array $attributes - Array of attributes to use in the update request | Performs 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 |
...