2017 © Pedro Peláez
 

library shipwire-api

Shipwire php integration

image

flydreamers/shipwire-api

Shipwire php integration

  • Wednesday, September 7, 2016
  • by sebathi
  • Repository
  • 4 Watchers
  • 9 Stars
  • 4,125 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 4 Open issues
  • 9 Versions
  • 1 % Grown

The README.md

shipwire-api

These library will help you with the usage of Shipwire API., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Installing via Composer

The recommended way to install Shipwire-API is through Composer., (*3)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Shipwire-API:, (*4)

composer require flydreamers/shipwire-api

After installing, you need to require Composer's autoloader:, (*5)

require 'vendor/autoload.php';

Documentation

Initial configuration

To configure the library just call ShipwireConnector::init() function to and start using it., (*6)

To use it you only have to configure your username and password in The clientyour config-local file like this:, (*7)

ShipwireConnector::init($config['username'], $config['password'], 'sandbox');

Stock

To check for Stock of a product:, (*8)

$response = $stock->getStockBySKUs(['CAPTRACKERBLUE']);

If you have more than one SKU, just add them to the array like:, (*9)

$response = $stock->getStockBySKUs(['CAPTRACKERBLUE', 'CAPTRACKERRED', 'ETCETERA']);

Extra parameters can be used. See \flydreamers\shipwire\Stock for more information., (*10)

Rates

You can ask Shipwire API for a shipping rate using Rate class., (*11)

$rate = new Rate;
$options = [
    "currency" => "USD",
    "groupBy" => "all",
    "canSplit" => 1,
    "warehouseArea" => "US"
];

$address = Address::createFromArray([
    "address1" => "6501 Railroad Avenue SE",
    "address2" => "Room 315",
    "address3" => "",
    "city" => "Snoqualmie",
    "postalCode" => "85283",
    "region" => "WA",
    "country" => "US",
    "isCommercial" => 0,
    "isPoBox" => 0
]);

$items = [
    ['sku' => 'CAPTRACKERBLUE', 'quantity' => 3]
];

$shippingInfo = $rate->quote($address, $items, $options);

Orders

$order = new \flydreamers\shipwire\Order();

TBD, (*12)

Issues and Feature Requests

If you have issues to report, or issues to request, use the issue tracker in Github., (*13)

Contributing

Currently, the library isn't very feature rich or mature. If you'd like to offer improvements:, (*14)

  1. Fork it
  2. Create your feature branch git checkout -b feature-name
  3. Commit your changes git commit -am 'Add feature' *
  4. Push the branch git push origin feature-name
  5. Create a pull request

Contact

Have a question? I'm on twitter: @sebathi, (*15)

License

MIT, (*16)

The Versions

16/12 2014

0.1.1

0.1.1.0

Shipwire php integration

  Sources   Download

MIT

The Requires

 

16/12 2014

0.1.0

0.1.0.0

Shipwire php integration

  Sources   Download

MIT

The Requires