If you have built a project where you create constants for variables like success
pending
failed
so as to have consistency across your codebase then this package is for you. This constants inludes variables for gateways like paystack
flutterwave
paypal
ETC. This package provides class variables that you can call statistically without instantiating the class. Example: Status::PAYSTACK
Status::FLUTTWAVE
Status::PAYPAL
;
You can install the package via composer:
composer require stephenjude/enums
All the constants we have defined in this package are grouped into different class-based categories. Lets dive into it:
use Stephenjude\Enums\Status;
Status::PENDING; //pending
Status::SUCCESS; //success
Status::FAILED; //failed
Status::WARNING; //warning
Status::ERROR; //error
Status::PUBLISHED; //published
Status::UNPUBLISHED; //unpublished
Status::APPROVED; //approved
Status::REJECTED; //rejected
Status::PROCESSING; //processing
Status::COMPLETED; //completed
Status::CANCELLED; //cancelled
use Stephenjude\Enums\Gateway;
Gateway::PAYPAL; //paypal
Gateway::STRIPE; //stripe
Gateway::BINANCE; //binance
Gateway::COINBASE; //coinbase
Gateway::PAYSTACK; //paystack
Gateway::FLUTTERWAVE; //flutterwave
Gateway::BUYPOWER_NG; //buypowerng
Gateway::BANK_TRANSFER; //bank_transfer
use Stephenjude\Enums\FileType;
FileType::VIDEO; //video
FileType::AUDIO; //audio
FileType::DOCUMENT; //document
FileType::TEXT; //text
FileType::PDF; //pdf
use Stephenjude\Enums\Currency;
Currency::USD; //usd
Currency::CAD; //cad
Currency::EUR; //eur
Currency::GBP; //gbp
Currency::NGN; //ngn
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.