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

apiKey String
getter/setter pair
baseUri String
final
hashCode int
The hash code for this object.
no setterinherited
isAuthenticated bool
no setter
loginId String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 given uri with body 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 given methodUrl.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

devUri String
final
liveUri String
final