Skip to content

Commit a017384

Browse files
v1.0.0
1 parent ff0035b commit a017384

File tree

5 files changed

+28
-19
lines changed

5 files changed

+28
-19
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## 0.1.0
2+
3+
- test publication
4+
5+
## 1.0.0
6+
7+
- Initial version

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
# webirr-api-dart-client
21
Official Dart Client Library for WeBirr Payment Gateway APIs
32

4-
*Requires Dart SDK >=2.12.0 <3.0.0*
3+
This Client Library provides convenient access to WeBirr Payment Gateway APIs from Dart/Flutter Apps.
54

6-
>This Client Library provides convenient access to WeBirr Payment Gateway APIs from Dart/Flutter Apps.
5+
*Requires Dart SDK >=2.12.0 <3.0.0*
76

87
## Install
9-
1. Add the dependecny in pubspec.yaml
108

11-
>dependencies:
12-
> webirr: ^0.1.0
9+
run the following command to install webirr client library
10+
11+
With Dart
1312

14-
2. run the dart pub get command
13+
```bash
14+
$ dart pub add webirr
15+
```
16+
With Flutter
1517

1618
```bash
17-
$ dart pub get
19+
$ flutter pub add webirr
1820
```
1921

2022
## Usage
@@ -25,7 +27,7 @@ The library needs to be configured with a *merchant Id* & *API key*. You can get
2527
2628
## Example
2729

28-
# Creating a new Bill / Updating an existing Bill on WeBirr Servers
30+
### Creating a new Bill / Updating an existing Bill on WeBirr Servers
2931

3032
```dart
3133
@@ -85,7 +87,7 @@ The library needs to be configured with a *merchant Id* & *API key*. You can get
8587
8688
```
8789

88-
# Getting Payment status of an existing Bill from WeBirr Servers
90+
### Getting Payment status of an existing Bill from WeBirr Servers
8991

9092
```dart
9193
@@ -120,7 +122,7 @@ The library needs to be configured with a *merchant Id* & *API key*. You can get
120122
121123
```
122124

123-
# Deleting an existing Bill from WeBirr Servers (if it is not paid)
125+
### Deleting an existing Bill from WeBirr Servers (if it is not paid)
124126

125127
```dart
126128
@@ -147,4 +149,4 @@ The library needs to be configured with a *merchant Id* & *API key*. You can get
147149
'errorCode: ${res.errorCode}'); // can be used to handle specific bussines error such as ERROR_INVLAID_INPUT
148150
}
149151
150-
```
152+
```

lib/src/bill.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// Bill or Invoice object issued to a customer
2+
/// it is basically a customer name and amount in ETB.
13
class Bill {
24
String customerCode;
35
String customerName;

lib/src/payment.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
/// Payment object returned from getPaymentStatus api call
12
class Payment {
23
/// 0 = not paid, 1 = payment in progress, 2. paid !
34
late int status;
45
PaymentDetail? data;
5-
6+
67
Payment.fromJson(Map<String, dynamic> json) {
78
status = json['status'];
89
data =
@@ -13,6 +14,7 @@ class Payment {
1314
bool get isPaid => status == 2;
1415
}
1516

17+
/// Payment Detail such as Bank Id, Bank Reference Number
1618
class PaymentDetail {
1719
late int id;
1820
late String paymentReference;

pubspec.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: webirr
2-
version: 0.1.0
3-
author: WeBirr Team <[email protected]>
2+
version: 1.0.0
43
description: >-
5-
Official Dart Client Library for WeBirr APIs
6-
This package can be used to integrate your apps with WeBirr payment gateway.
7-
It is a wrapper for the REST Web Service API. It can be used to create, update
8-
& delete bills and also check the payment status of bills
4+
Official Dart Client Library for WeBirr APIs
95
homepage: https://github.com/webirr/webirr-api-dart-client
106
environment:
117
sdk: '>=2.12.0 <3.0.0'

0 commit comments

Comments
 (0)