2017 © Pedro Peláez
 

library client

VIPparcel Client PHP

image

vipparcel/client

VIPparcel Client PHP

  • Thursday, July 21, 2016
  • by vipparcel
  • Repository
  • 2 Watchers
  • 2 Stars
  • 125 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 11 Open issues
  • 4 Versions
  • 7 % Grown

The README.md

VIPparcel APIs Client Library for PHP

Requirements

Developer Documentation

https://vipparcel.com/docs/api/, (*1)

Dependence

  • [Guzzle HTTP client] (https://github.com/guzzle/guzzle)

Installation

Run the Composer command, (*2)

composer require "vipparcel/client" 

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

require 'vendor/autoload.php';

## Examples

$client = new VP_Client();
$client->auth_token('KEY');
$client->is_test(TRUE); // production or test request (default: production)

$request = new VP_Request_Account_Balance_History();
$request->set_params(array('limit' => 10, 'orderBy' => array('created' => 'ASC')));

$client->request($request); // set request object

$result = $client->execute(); // send request (return object VP_Response)
print_r($result->has_errors()); // boolean
print_r($result->get_errors()); // boolean false || array
print_r($result->as_object()); // result as stdClass object
print_r($result->as_array()); // result as array
$client = new VP_Client();
$client->auth_token('KEY');
$client->request(new VP_Request_Shipping_Label_Info(144241)); // with item id
$result = $client->execute();
...

Request Objects

Account > Address * [POST] VP_Request_Account_Address_Create * [GET] VP_Request_Account_Address_List * [GET] VP_Request_Account_Address_Info * [PUT] VP_Request_Account_Address_Update * [DELETE] VP_Request_Account_Address_Delete, (*4)

Account > Balance * [GET] VP_Request_Account_Balance_Current * [GET] VP_Request_Account_Balance_History, (*5)

Account > Personal Info * [GET] VP_Request_Account_Personal_Details * [PUT] VP_Request_Account_Personal_Update, (*6)

Shipping > Label * [GET] VP_Request_Shipping_Label_Info * [GET] VP_Request_Shipping_Label_List * [GET] VP_Request_Shipping_Label_Images * [POST] VP_Request_Shipping_Label_Calculate * [POST] VP_Request_Shipping_Label_Print, (*7)

Shipping > Pickup * [GET] VP_Request_Shipping_Pickup_List * [GET] VP_Request_Shipping_Pickup_Info * [POST] VP_Request_Shipping_Pickup_Request, (*8)

Shipping > Refund * [GET] VP_Request_Shipping_Refund_Info * [GET] VP_Request_Shipping_Refund_List * [GET] VP_Request_Shipping_Refund_Labels * [POST] VP_Request_Shipping_Refund_Request, (*9)

Shipping > Scan Form * [GET] VP_Request_Shipping_Scan_Info * [GET] VP_Request_Shipping_Scan_List * [GET] VP_Request_Shipping_Scan_Labels * [POST] VP_Request_Shipping_Scan_Create, (*10)

Shipping > Tracking * [GET] VP_Request_Shipping_Tracking_Info, (*11)

Location > Country * [GET] VP_Request_Location_Country_List, (*12)

Location > State * [GET] VP_Request_Location_State_List, (*13)

The Versions

21/07 2016

dev-master

9999999-dev

VIPparcel Client PHP

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

by Avatar vipparcel
by Invision

23/09 2015

v1.2

1.2.0.0

VIPparcel Client PHP

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

by Avatar vipparcel
by Invision

04/12 2014

v1.1

1.1.0.0

VIPparcel Client PHP

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

by Avatar vipparcel
by Invision

03/12 2014

v1.0

1.0.0.0

VIPparcel Client PHP

  Sources   Download

GNU GENERAL PUBLIC LICENSE

The Requires

 

by Avatar vipparcel
by Invision