Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
keeratita committed Apr 4, 2021
1 parent b053cd0 commit d0bbc5e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.1.4] - Minor update

- Update an exmaple
- Update packages
- Deprecated a `security_code_check` attribute of Card API
- Added a new attribute named `charge_status` of Token API

## [0.1.3] - Update an example

- Add timeout error
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ More information: https://pub.dev/packages/omise_flutter

```
dependencies:
omise_flutter: ^0.1.3
omise_flutter: ^0.1.4
```

2. Install it from the command
Expand Down
6 changes: 1 addition & 5 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ exampleCreateToken() async {
final token = await omise.token
.create("John Doe", "4242424242424242", "12", "2020", "123");

if (token.card.securityCodeCheck == true) {
// Send a token back to your server
} else {
// Show error: Invalid CVV or the card can't be used
}
// TODO: You have to send the given token id back to your server.
}

exampleCreateSource() async {
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ packages:
omise_flutter:
dependency: "direct main"
description:
name: omise_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
path: ".."
relative: true
source: path
version: "0.1.4"
path:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: YOUR_PROJECT_NAME

dependencies:
omise_flutter: 0.1.3
omise_flutter:
path: ..
2 changes: 2 additions & 0 deletions lib/src/responses/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Card {
int expirationYear;
String fingerprint;
String name;
@Deprecated(
"This attribute is deprecated. Please check https://www.omise.co/cards-api")
bool securityCodeCheck;

Card(
Expand Down
3 changes: 3 additions & 0 deletions lib/src/responses/token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Token {
String id;
bool livemode;
String location;
String chargeStatus;
String createdAt;
bool used;
Card card;
Expand All @@ -23,6 +24,7 @@ class Token {
id = json['id'];
livemode = json['livemode'];
location = json['location'];
chargeStatus = json['charge_status'];
createdAt = json['created_at'];
used = json['used'];
card = json['card'] != null ? new Card.fromJson(json['card']) : null;
Expand All @@ -34,6 +36,7 @@ class Token {
data['id'] = this.id;
data['livemode'] = this.livemode;
data['location'] = this.location;
data['charge_status'] = this.chargeStatus;
data['created_at'] = this.createdAt;
data['used'] = this.used;
if (this.card != null) {
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: omise_flutter
description: A package for integrating to Omise REST API. It targets only for a client-side usage to create a token, create a source and retrieve a capability of your account.
version: 0.1.3
version: 0.1.4
homepage: https://keerati.co
repository: https://github.com/keeratita/omise_flutter

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: '>=2.1.0 <3.0.0'

dependencies:
flutter:
sdk: flutter
crypto: ">=1.0.0 <3.0.0"
http: ">=0.11.1 <0.13.0"
crypto: '>=1.0.0 <3.0.0'
http: '>=0.11.1 <0.13.0'

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit d0bbc5e

Please sign in to comment.