m8ty_client_pis
Account information service cover all the aspects of accounts and transactions.
Before you start
Check the documentation of the m8ty_client_pis 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_pis/m8ty_client_pis.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
Create a simple payment
final paymentModel = ModelHelperPayments().createPaymentDetailed(
executionDate: Date.now(),
accountId: "123",
amount: 100,
purpose: "Care for me",
counterpartIban: "CH9300762011623852957",
counterpartName: "Migros",
standingOrderFrequency: FrequencyEnumModel.QUARTERLY,
standingOrderEndDate: DateTime.now().add(Duration(year: 2)).toDate(),
);
final client = M8tyClientPis().getPaymentsApi();
client.createPayment(paymentModel: paymentModel);
Create a standing order
final paymentModel = ModelHelperPayments().createPaymentDetailed(
executionDate: Date.now(),
accountId: "123",
amount: 100,
purpose: "Care for me",
counterpartIban: "CHkskks",
counterpartName: "Migros",
standingOrderFrequency: FrequencyEnumModel.QUARTERLY,
standingOrderEndDate: DateTime.now().add(Duration(year: 2)).toDate()
);
final client = M8tyClientPis().getPaymentsApi();
client.createPayment(paymentModel: paymentModel);
Last modified: 16 March 2024