m8ty_client_ebills
Package overview
Section titled “Package overview”m8ty_client_ebills solves this by providing E-Bill user data, counters, subscriptions, and a single-sign-on portal link, making bill management available from the banking app.
E-Bill client for managing electronic bills, subscriptions, and SSO access to the E-Bill portal.
Before you start
Section titled “Before you start”Check the documentation of the m8ty_client_ebills library.
Import all needed libraries
Section titled “Import all needed libraries”import 'package:dio/dio.dart';import 'package:m8ty_client_ebills/m8ty_client_ebills.dart';Client Setup
Section titled “Client Setup”final client = M8tyClientEbills();client.setOAuthToken('ApiOAuth2', oauthToken);API Surface
Section titled “API Surface”EBillApi
Section titled “EBillApi”| Method | Description |
|---|---|
eBillCounters |
Return E-Bill counters for a particular E-Bill user |
eBillUser |
Return E-Bill user |
eBillSubscribe |
Subscribe to E-Bill |
eBillGetSsoJumpUrl |
Get SSO Jump URL for E-Bill portal |
How to perform different tasks
Section titled “How to perform different tasks”Here some examples how the dart client can be used
Get E-Bill counters
Section titled “Get E-Bill counters”final client = M8tyClientEbills();client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getEBillApi();
try { final response = await api.eBillCounters(); print('Counters: ${response.data}');} on DioException catch (e) { throw Exception( 'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}', );}Get E-Bill user
Section titled “Get E-Bill user”final client = M8tyClientEbills();client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getEBillApi();final response = await api.eBillUser();Get SSO Jump URL for E-Bill portal
Section titled “Get SSO Jump URL for E-Bill portal”final client = M8tyClientEbills();client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getEBillApi();final response = await api.eBillGetSsoJumpUrl();print('SSO URL: ${response.data}');Subscribe to E-Bill
Section titled “Subscribe to E-Bill”final client = M8tyClientEbills();client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getEBillApi();
try { await api.eBillSubscribe();} on DioException catch (e) { throw Exception( 'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}', );}© m8ty GmbH 2023 · m8ty.eu
