ClientApi class
Implementation of the Client to Server API interface.
All methods that execute an API call have the following arguments:
required void Function(T data) onSuccess
required void Function(ApiErrorResponse apiError) onApiError
required void Function(NativeException exception) onFailure
These act as callback functions for the different outcomes of the API call and are wrapped in a _NativeFutureListener
instance.
_NativeFutureListener.success
will be triggered if the API was executed successfully, providing the relevant data
object if applicable.
_NativeFutureListener.apiError
will be triggered if the API call was not executed successfully or returned an unsuccessful response. Details of the error are provided in the ApiErrorResponse apiError
supplied to the callback.
_NativeFutureListener.failure
will be triggered if an exception occurred outside of the API call scope. Additional details are provided in the NativeException exception
supplied to the callback.
Constructors
- ClientApi.new(ConnectSDKConfiguration connectSDKConfiguration)
Properties
- connectSDKConfiguration → ConnectSDKConfiguration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convertAmount(
{required String source, required String target, required int amount, required void onSuccess(ConvertedAmount), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the ConvertedAmount for the provided input from the Connect Gateway.
The Connect Gateway will convert the provided
amount
from its original currencysource
to the new currencytarget
. -
getIINDetails(
{required String partialCreditCardNumber, required void onSuccess(IinDetailsResponse iinDetailsResponse), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the IinDetailsResponse for the provided
partialCreditCardNumber
from the Connect Gateway. -
getPaymentItems(
{required void onSuccess(BasicPaymentItems), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic - Retrieves the BasicPaymentItems from the Connect Gateway.
-
getPaymentProduct(
{required String paymentProductId, required void onSuccess(PaymentProduct paymentProduct), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the PaymentProduct as identified by the provided
paymentProductId
from the Connect Gateway. -
getPaymentProductDirectory(
{required String paymentProductId, required void onSuccess(PaymentProductDirectory), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the PaymentProductDirectory associated to the provided
paymentProductId
from the Connect Gateway. -
getPaymentProductGroup(
{required String paymentProductGroupId, required void onSuccess(PaymentProductGroup), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the PaymentProductGroup as identified by the provided
paymentProductGroupId
from the Connect Gateway. -
getPaymentProductGroups(
{required void onSuccess(BasicPaymentProductGroups basicPaymentProductGroups), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic - Retrieves the BasicPaymentProductGroups from the Connect Gateway.
-
getPaymentProducts(
{required void onSuccess(BasicPaymentProducts basicPaymentProducts), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic - Retrieves the BasicPaymentProducts from the Connect Gateway.
-
getPrivacyPolicy(
{String? paymentProductId, String? locale, required void onSuccess(PrivacyPolicyResponse privacyPolicyResponse), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
getPublicKey(
{required void onSuccess(PublicKey publicKey), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic - Retrieves the PublicKey from the Connect Gateway.
-
getThirdPartyStatus(
{required String paymentId, required void onSuccess(ThirdPartyStatusResponse), required void onApiError(ApiErrorResponse apiError), required void onFailure(NativeException e)}) → dynamic -
Retrieves the ThirdPartyStatusResponse for the provided
paymentId
from the Connect Gateway. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieveLogo(
String logoUrl, {Key? key, double scale = 1.0, ImageFrameBuilder? frameBuilder, ImageLoadingBuilder? loadingBuilder, ImageErrorWidgetBuilder? errorBuilder, String? semanticLabel, bool excludeFromSemantics = false, double? width, double? height, Color? color, Animation< double> ? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, FilterQuality filterQuality = FilterQuality.low, bool isAntiAlias = false, int? cacheWidth, int? cacheHeight}) → Image -
Retrieves the logo for a payment product or payment product group based on the
logoUrl
using Image.network. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited