getAvailablePayments method

Future<List<AvailablePaymentModel>> getAvailablePayments(
  1. int customerId, {
  2. required Object authorization,
})

Parameters:

  • int customerId (required):

  • Object authorization:

Implementation

Future<List<AvailablePaymentModel>> getAvailablePayments(
  int customerId, {
  required Object authorization,
}) async {
  final response = await getAvailablePaymentsWithHttpInfo(
    customerId,
    authorization: authorization,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }

  final responseBody = await _decodeBodyBytes(response);
  return (await apiClient.deserializeAsync(
          responseBody, 'List<AvailablePaymentModel>') as List)
      .cast<AvailablePaymentModel>()
      .toList(growable: false);
}