Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fullpipe/biglion-client

Biglion Api Client
https://github.com/fullpipe/biglion-client

Last synced: about 4 hours ago
JSON representation

Biglion Api Client

Awesome Lists containing this project

README

        

# Simple Biglion Api Client

## Usage
```php
$bc = new \Fullpipe\Biglion\Client('[email protected]', 'password');

try {
var_dump($bc->getCouponInfo('012345-0000-0001'));
var_dump($bc->redeemCoupon('012345-0000-0001', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0001', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}

try {
var_dump($bc->getCouponInfo('012345-0000-0002'));
var_dump($bc->redeemCoupon('012345-0000-0002', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0002', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}

try {
var_dump($bc->getCouponInfo('012345-0000-0003'));
var_dump($bc->redeemCoupon('012345-0000-0003', '1234'));
var_dump($bc->reserveCoupon('012345-0000-0003', '387'));
} catch (\Fullpipe\Biglion\BiglionException $e) {
echo $e->getMessage();
}
```

## Test
```
composer install --dev
[email protected] BIGLION_PASSWORD=password vendor/bin/phpunit
```