dnb 1.0.1+1 copy "dnb: ^1.0.1+1" to clipboard
dnb: ^1.0.1+1 copied to clipboard

outdated

A platform-agnostic Dart client library for interacting with DNB's open APIs.



DNB Open Banking Client

A Dart client for DNB's API products. (Under development, may change)

Travis Build Status npm (latest) GitHub contributors License Gitmoji

The APIs are currently under development, and only available in a sandbox. To use this API, you have to create an application at https://developer.dnb.no.

See examples below.

Usage #

import 'package:dnb/dnb.dart';

void main() async {
  final dnb = DNB(
      clientKey: 'YOUR-CLIENT-KEY',
      clientSecret: 'YOUR-CLIENT-SECRET',
      apiKey: 'YOUR-API-KEY');

  /// Retrieve all test customers from sandbox
  final testCustomers = await dnb.getTestCustomers();

  /// Retrieve token for access to other APIs
  final token = await dnb.getToken(customerId: 'CUSTOMER-ID');

  /// Retrieve the current customer using the token
  final customer = await dnb.getCurrentCustomer(jwt: token);
}

Features #

The DNB class contains helper methods for creating payment bodies.

final payment = dnb.createPaymentBody(
  creditAccount: '12345678901',
  debitAccount: '10987654321',
  amount: 500,
  executionDate: DateTime.now(),
);

await dnb.initiatePayment(payment: payment);

Development #

First, clone the repo. You will need API keys to run the tests. Make a new app at https://developer.dnb.no.

Do pub get.

Run tests with pub run test.

Do not commit directly to master. Preferably, make a branch or fork out of the development branch and make a pull request.

License #

MIT © 2019 Arne Molland

1
likes
0
pub points
0%
popularity

Publisher

verified publishermolland.sh

A platform-agnostic Dart client library for interacting with DNB's open APIs.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, meta, sigv4

More

Packages that depend on dnb