Help Instance Help

m8ty_client_ais

Account information service cover all the aspects of accounts and transactions.

Before you start

Check the documentation of the m8ty_client_ais library to get an idea about the available models and their properties.

import all needed libraries

import 'package:dio/dio.dart'; import 'package:m8ty_client_ais/m8ty_client_ais.dart'; import 'package:m8ty_client_common/m8ty_client_common.dart'; import 'package:built_collection/built_collection.dart';

How to perform different tasks

Here some examples how the dart client can be used

Get list of all bank accounts

final client = M8tyClientAis().getAccountsApi(); final Response<AccountsResponseModel> allAccounts = await client.listAllAccounts( page: 1, size: 100, includeBankData: true, );

Search accounts by using filter options

final accountRequestModel = AccountDataRequestModel((b) => b ..accountIBAN = "CH9300762011623852957" ..accountIsoCurrency = IsoCurrencyEnumModel.CHF); final client = M8tyClientAis().getAccountsApi(); final Response<AccountsResponseModel> allAccounts = await client.searchAccounts( accountDataRequestModel: accountRequestModel, page: 1, size: 100, );

Get list of all transactions

final transactionsRequestModel = SearchTransactionRequestModel( (b) => b ..accountIds = ListBuilder(["accountId", "accountId2"]) ..bookingDateFrom = DateTime.now(), ); final client = M8tyClientAis().getTransactionsApi(); final Response<SearchTransactionResponseModel> allTransactions = await client.searchTransactions( searchTransactionRequestModel: transactionsRequestModel, page: 1, size: 100, );

Use google search options

final transactionsRequestModel = SearchTransactionRequestModel( (b) => b ..accountIds = ListBuilder(["accountId", "accountId2"]) ..search = "Shell", ); final client = M8tyClientAis().getTransactionsApi(); final Response<SearchTransactionResponseModel> allTransactions = await client.searchTransactions( searchTransactionRequestModel: transactionsRequestModel, page: 1, size: 100, ); });
Last modified: 05 March 2024