ApiConversions
class ApiConversions extends ApiBase (View source)
Class to management MangoPay API for instant conversions
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
Get entity object from API
Get lst with entities object from API
Save object in API
Executes a POST request
Cast response object to entity object
This endpoint allows the platform to get a real time indicative market rate of a specific currency pair.
This endpoint allows the platform to move funds between two wallets of different currencies instantaneously.
This call triggers an immediate conversion at the market rate, of the debited funds to the credited wallet at the market rate.
This call triggers a conversion, at the rate guaranteed by its quote, of the debited funds to the credited wallet.
This call triggers a conversion at the rate defined in its quote.
This endpoint allows the platform to get the details of a conversion which has been carried out.
This call guarantees a conversion rate to let you Create a Quoted Conversion.
This endpoint allows the platform to get the details of a quote
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 object
CreateObject(string $methodKey, object $entity, object $responseClassName = null, string $entityId = null, $subEntityId = null, $idempotencyKey = null)
Create object in API
protected object
GetObject(string $methodKey, object $responseClassName, $firstEntityId = null, $secondEntityId = null, $thirdEntityId = null, $clientIdRequired = true)
Get entity object from API
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 object
ExecutePostRequest($methodKey, $entity, $responseClassName, $entityId = null)
Executes a POST request
protected Error
CastResponseToError(object $response)
Cast response object to an error object
protected
CastResponseToEntity(object $response, string $entityClassName, $asDependentObject = false)
Cast response object to entity object
protected array
BuildRequestData(object $entity)
Get array with request data
protected
GetObjectForIdempotencyUrl($url)
No description
ConversionRate
GetConversionRate(string $debitedCurrency, string $creditedCurrency)
This endpoint allows the platform to get a real time indicative market rate of a specific currency pair.
The rate returned is given in real time.
Conversion
CreateInstantConversion(CreateInstantConversion $instantConversion)
This endpoint allows the platform to move funds between two wallets of different currencies instantaneously.
Conversion
CreateClientWalletsInstantConversion(CreateClientWalletsInstantConversion $instantConversion)
This call triggers an immediate conversion at the market rate, of the debited funds to the credited wallet at the market rate.
A quote is not required for an instant conversion.
Conversion
CreateQuotedConversion(CreateQuotedConversion $quotedConversion)
This call triggers a conversion, at the rate guaranteed by its quote, of the debited funds to the credited wallet.
Conversion
CreateClientWalletsQuotedConversion(CreateClientWalletsQuotedConversion $quotedConversion)
This call triggers a conversion at the rate defined in its quote.
The debited funds (buy currency), credited funds (sell currency) and currencies are defined in the quote. The Client Wallets to debit and credit are defined in the conversion.
Each quoted conversion requires a dedicated Quote object, linked in the QuoteId.*
Conversion
GetConversion(string $id)
This endpoint allows the platform to get the details of a conversion which has been carried out.
ConversionQuote
CreateConversionQuote(ConversionQuote $quote)
This call guarantees a conversion rate to let you Create a Quoted Conversion.
ConversionQuote
GetConversionQuote(string $quoteId)
This endpoint allows the platform to get the details of a quote