ApiCards
class ApiCards extends ApiBase (View source)
Class to management MangoPay API for cards
Properties
| protected MangoPayApi | $_root | Root/parent instance that holds the OAuthToken and Configuration instance |
from ApiBase |
Methods
Constructor Root/parent instance that holds the OAuthToken and Configuration instance
Create object in API
No description
Get entity object from API
Get entity object from API endpoint that has a lot of query params
Get entity object from API on a request path that contains pagination and other query params
Get lst with entities object from API
Save object in API
Does the same thing as SaveObject above, but keeps natural order of provided entity ids when building the URL
Executes a POST request
Cast response object to entity object
Gets a list of cards having the same fingerprint.
Gets a Card's PreAuthorizations
Retrieves a list of Transactions pertaining to a certain Card
Validate a card
Get card validation
Gets a list of transactions having for a card fingerprint.
Details
protected mixed
getLogger()
No description
__construct(MangoPayApi $root)
Constructor Root/parent instance that holds the OAuthToken and Configuration instance
protected string
GetRequestUrl(string $key)
Get URL for REST Mango Pay API
protected RequestType
GetRequestType(string $key)
Get request type for REST Mango Pay API
protected
GetApiVersion($key)
No description
protected object
CreateObject(string $methodKey, object $entity, object $responseClassName = null, string $entityId = null, $subEntityId = null, $idempotencyKey = null)
Create object in API
protected object
CreateOrUpdateMultipartObject(string $methodKey, string $file, string $fileName, string $responseClassName = null, string $entityId = null, string $idempotencyKey = null)
No description
protected object
GetObject(string $methodKey, object $responseClassName, $firstEntityId = null, $secondEntityId = null, $thirdEntityId = null, $clientIdRequired = true)
Get entity object from API
protected object
GetObjectManyQueryParams(string $methodKey, object $responseClassName, ...$queryParams)
Get entity object from API endpoint that has a lot of query params
protected object
GetObjectWithPagination(string $methodKey, object $responseClassName, $pagination = null, $filter = null, $entityId = null, $clientIdRequired = true)
Get entity object from API on a request path that contains pagination and other query params
protected object[]
GetList(string $methodKey, Pagination $pagination, object $responseClassName = null, string $entityId = null, object $filter = null, Sorting $sorting = null, $secondEntityId = null, $clientIdRequired = true)
Get lst with entities object from API
protected object
SaveObject(string $methodKey, object $entity, object $responseClassName = null, $secondEntityId = null, $thirdEntityId = null)
Save object in API
protected
UpdateObject($methodKey, $entity, $responseClassName = null, $firstEntityId = null, $secondEntityId = null, $thirdEntityId = null)
Does the same thing as SaveObject above, but keeps natural order of provided entity ids when building the URL
protected
DeleteObject($methodKey, $entity, $responseClassName = null)
No description
protected object
ExecutePostRequest(mixed $methodKey, mixed $entity, mixed $responseClassName, mixed $entityId = null, $idempotency_key = null)
Executes a POST request
protected Error
CastResponseToError(object $response)
Cast response object to an error object
protected
CastResponseToEntity($response, $entityClassName, $asDependentObject = false)
Cast response object to entity object
protected array
BuildRequestData(object $entity)
Get array with request data
protected
GetObjectForIdempotencyUrl($url)
No description
Card
Get(string $cardId)
Get card
Card[]
GetByFingerprint(string $fingerprint, Pagination $pagination = null, Sorting $sorting = null)
Gets a list of cards having the same fingerprint.
The fingerprint is a hash uniquely generated per 16-digit card number.
CardPreAuthorization[]
GetPreAuthorizations(int $cardId, Pagination $pagination = null, FilterPreAuthorizations $filter = null, Sorting $sorting = null)
Gets a Card's PreAuthorizations
Transaction[]
GetTransactions(string $cardId, Pagination $pagination = null, FilterTransactions $filter = null, Sorting $sorting = null)
Retrieves a list of Transactions pertaining to a certain Card
CardValidation
ValidateCard(mixed $cardId, $cardValidation)
Validate a card
Card
GetCardValidation(mixed $cardId, $cardValidationId)
Get card validation
Transaction[]
GetTransactionsByFingerprint(string $fingerprint, FilterTransactions $filter = null, Pagination $pagination = null, Sorting $sorting = null)
Gets a list of transactions having for a card fingerprint.
The fingerprint is a hash uniquely generated per 16-digit card number.