An object-oriented approach towards using the Machship API.
Offical Documentation: click here
You can install the package via composer:
composer require saad-bhutto/machshipThe package is built around endpoint classes, which are converted to modals.
The API can be initialize using these
// initializing the object
$api = Machship::make(MACHSHIP_TOKEN);Get all companies that the current user can access
// get the object
$api->companies()->all();Find a single company by ID
// get the object
$api->companies()->findById($id);Get all Warehouses/CompanyLocations that the current user can access
// get the object
$api->warehouses()->all();Find a single warehouses by ID
// get the object
$api->warehouses()->findById($id);Get all CarrierServices that the current user can access
// get the object
$api->carrierservices()->all();Find a single carrierservices by ID
// get the object
$api->carrierservices()->findById($id);Get all the active Consignments that the current user can access in machship N.B. this is a cursored endpoint, i.e. it has paginations enabled
// get the first page of consignments object
$api->consignments()->all();next() can be used iteratively to get the objects from next page
// get the next page of consignments object
$api->consignments()->next();Find a single consignment by ID
// get the object
$api->consignments()->findById($id);Get all the active Producsts/Items that the current user can access in machship N.B. this is a cursored endpoint, i.e. it has paginations enabled
// get the first page of consignments object
$api->products()->all();next() can be used iteratively to get the objects from next page
// get the next page of products object
$api->products()->next();Find a single consignment by ID
// get the object
$api->products()->findById($id);WIP WIP WIP WIP WIP WIP WIP WIP
composer testPlease see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email saadbhutto@ymail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.