CurrencyCloudClient class
CurrencyCloudClient is used for communication with the CurrencyCloudService. It provides Request methods like get and post which handle the basic communication overheads like adding authentication headers.
Constructors
- CurrencyCloudClient(String loginId, String apiKey, {bool useLiveUri = false})
-
Provide true for
useLiveUri
if you want to use this client in production and trigger real money transfers
Properties
Methods
-
authenticate(
) → Future< void> - Authenticates this CurrencyCloud using its loginId and apiKey. CurrencyCloud will authenticate automatically if a Request is sent without authenticating or when the Authentication Token expires.
-
closeSession(
) → Future< void> - Closes authenticated Session
-
get(
String uri, {Map< String, dynamic> ? body, Map<String, String> ? headers}) → Future<Map< String, dynamic> > -
Sets auth headers in provided
headers
and sends HTTP GET request to givenuri
withbody
set as encoded uri parameters. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String methodUrl, {Map< String, dynamic> ? body, Map<String, String> ? headers}) → Future<Map< String, dynamic> > -
Sets auth headers in provided
headers
and sends HTTP POST request to givenmethodUrl
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited