Skip to content

Commit

Permalink
Fix Readme typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alefealvessilva committed Mar 25, 2023
1 parent 465243a commit 05a9884
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.0.1] - 25-03-2023

- Fix Readme typing errors

## [1.0.0] - 25-03-2023

### This release generated BREAKING CHANGES see the docs!
Expand Down
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ First instantiate the class passing the appropriate parameters
final pixBB = PixBB(
ambiente: Ambiente.homologacao,
// Optional, By default, the initial environment is defined as the production
basicKey:'BASIC_KEY',
appDevKey: 'APP_DEV_KEY',
applicationDeveloperKey: 'APP_DEV_KEY',
);
```

Expand All @@ -157,36 +156,18 @@ Make a request to the API with request a list of transactions received from the
```dart
await pixBB.getToken().then((token) {
pixBB
.getRecentReceivedTransactions(accessToken: token.accessToken)
.fetchTransactions(token: token)
.then((response) {
print(response); // it's a List<Pix>.
}).catchError((e) {
print('${e.errorCode} , ${e.errorMessage} , ${e.errorData}'); // It's a PixError.
print(e);
// It's a PixException.
//This package provides several ways to handle errors that may occur.
//see the docs!
});
});
```

Make a request for a list of transactions as of a specific date

//Attention!, the maximum difference in days between the start and end date must be 4 days

```dart
await pixBB.getToken().then((token) {
pixBB
.getTransactionsByDate(
accessToken: token.accessToken,
initialDate: DateTime.now().subtract(const Duration(days: 4)),
finalDate: DateTime.now(),
)
.then((response) {
print(response);// it's a List<Pix>.
}).catchError((e) {
print('${e.errorCode} , ${e.errorMessage} , ${e.errorData}'); // It's a PixError.
});
});
```

_For more examples, please refer to the_ [Documentation](https://pub.dev/documentation/pix_bb/latest/)

<p align="right">(<a href="#readme-top">back to top</a>)</p>
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pix_bb
description: Easy-to-use interface for integrating with Banco do Brasil's Pix API.
version: 1.0.0
version: 1.0.1
homepage: https://github.com/AcxTechSistemas/pix_bb

environment:
Expand Down

0 comments on commit 05a9884

Please sign in to comment.