fullpipe / biglion-client
Simple Biglion api client
Installs: 20 026
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is auto-updated.
Last update: 2024-11-27 00:56:22 UTC
README
Usage
$bc = new \Fullpipe\Biglion\Client('email@example.com', '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
BIGLION_EMAIL=email@example.com BIGLION_PASSWORD=password vendor/bin/phpunit