mollie-es6
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "mollie-es6", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Mollie module ready for ES6 usage", | ||
@@ -5,0 +5,0 @@ "main": "app.js", |
@@ -125,7 +125,46 @@ # Mollie ES6 API client for Node.js # | ||
| Functionality |Implemented | | ||
|:-------------:|:-------------:| | ||
| List | Yes | | ||
| Get | Yes | | ||
#### List #### | ||
```ES6 | ||
const options = { | ||
count: 10, | ||
offset: 5 | ||
} | ||
try { | ||
const methods_list = yield mollie.methods.list(options); | ||
/* | ||
methods_list = { | ||
totalCount: Number, | ||
offset: Number, | ||
count: Number, | ||
data: [Methods], | ||
links: { | ||
first: String(url), | ||
previous: String(url), | ||
next: String(url), | ||
last: String(url) | ||
} | ||
} | ||
*/ | ||
} catch (e) { | ||
// Handle error | ||
} | ||
``` | ||
#### Get #### | ||
```ES6 | ||
const amount = 100.00; | ||
const method_id = 'creditcard'; | ||
try { | ||
const method = yield mollie.methods.get(method_id); | ||
if(method.getMinAmount() < amount && method.getMaxAmount > amount) { | ||
// Allow user to check out | ||
} | ||
} catch (e) { | ||
// Handle error | ||
} | ||
``` | ||
### Issuer ### | ||
@@ -132,0 +171,0 @@ |
52054
186