WeBirrClient class Null safety

A WeBirrClient instance object can be used to Create, Update or Delete a Bill at WeBirr Servers and also to Get the Payment Status of a bill. It is a wrapper for the REST Web Service API.

Constructors

WeBirrClient({required String apikey, required bool isTestEnv})

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createBill(Bill bill) Future<ApiResponse<String>>
Create a new bill at WeBirr Servers. Check if(ApiResponse.error == null) to see if there are errors. ApiResponse.res will have the value of the returned PaymentCode on success.
deleteBill(String paymentCode) Future<ApiResponse<String>>
Delete an existing bill at WeBirr Servers, if the bill is not paid yet. paymentCode is the number that WeBirr Payment Gateway returns on createBill. Check if(ApiResponse.error == null) to see if there are errors. ApiResponse.res will have the value of "OK" on success.
getPaymentStatus(String paymentCode) Future<ApiResponse<Payment>>
Get Payment Status of a bill from WeBirr Servers paymentCode is the number that WeBirr Payment Gateway returns on createBill. Check if(ApiResponse.error == null) to see if there are errors. ApiResponse.res will have Payment object on success (will be null otherwise!) ApiResponse.res?.isPaid ?? false -> will return true if the bill is paid (payment completed) ApiResponse.res?.data ?? null -> will have PaymentDetail object
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
updateBill(Bill bill) Future<ApiResponse<String>>
Update an existing bill at WeBirr Servers, if the bill is not paid yet. The billReference has to be the same as the original bill created. Check if(ApiResponse.error == null) to see if there are errors. ApiResponse.res will have the value of "OK" on success.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited