2017 © Pedro Peláez
 

library postmen

API Wrapper for postmen.com

image

oceanapplications/postmen

API Wrapper for postmen.com

  • Sunday, December 4, 2016
  • by oceanapplications
  • Repository
  • 1 Watchers
  • 3 Stars
  • 348 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Postmen

Scrutinizer Code Quality, (*1)

API wrapper for https://www.postmen.com/, (*2)

Install with composer

composer require oceanapplications/postmen, (*3)

Create label


//create item $item = new Item(); $item->description('description')->quantity(1)->price(new Money(100, 'INR'))->weight(new Weight(1,'lb')); //create parcel $parcel = new Parcel(); $parcel->box_type('custom')->dimension(new Dimension(4,4,4,"cm"))->items($item)->description('descr')->weight(new Weight(2, 'lb')); //create from address $fromAddress = new Address(); $fromAddress->city('New Delhi')->company_name('company India')->country('IND')->contact_name('Name')->street1('street1') ->postal_code('110045')->state('Delhi')->phone('9654444444'); //create send address $toAddress = new Address(); $toAddress->city('New Delhi')->company_name('company India')->country('IND')->contact_name('Name')->street1('street1') ->postal_code('110045')->state('Delhi')->phone('9654444444'); //create shipment and assign addresses and parcel $shipment = new Shipment(); $shipment->ship_from($fromAddress); $shipment->ship_to($toAddress); $shipment->parcels(array($parcel)); //create label and assign shipment $label = new Label(); $label->service_type('bluedart_surface')->shipper_account('shipper id from postmen') ->shipment($shipment)->invoice(new Invoice())->COD(new Money(100, 'INR')); //finally create client and send request $client = new Client('postmen api_key'); $response = $client->createLabel($label);

The Versions

04/12 2016

dev-master

9999999-dev

API Wrapper for postmen.com

  Sources   Download

GPL-3.0+

The Development Requires

by Ocean Applications

api shipping postmen

14/09 2016

0.2.1

0.2.1.0

API Wrapper for postmen.com

  Sources   Download

GPL-3.0+

The Development Requires

by Ocean Applications

api shipping postmen

07/09 2016

0.2

0.2.0.0

API Wrapper for postmen.com

  Sources   Download

GPL-3.0+

The Development Requires

by Ocean Applications

api shipping postmen

27/08 2016

0.1

0.1.0.0

API Wrapper for postmen.com

  Sources   Download

The Development Requires

by Ocean Applications

postmen shippingx