Skip to content

saad-bhutto/machship

Repository files navigation

WIP Machship-SDK

An object-oriented approach towards using the Machship API.

Latest Version on Packagist Total Downloads

Offical Documentation: click here

Supported Objects / Endpoints:

Installation

You can install the package via composer:

composer require saad-bhutto/machship

Usage

The 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);

Testing

WIP WIP WIP WIP WIP WIP WIP WIP

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email saadbhutto@ymail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

This is the Machship API Wrapper for PHP

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages