chenhaoran / vipparcel-client-php
There is no license information available for the latest version (dev-master) of this package.
vipparcel
dev-master
2018-12-24 08:27 UTC
Requires
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2022-03-24 16:03:18 UTC
README
Requirements
- PHP 5.5 or higher
- [PHP cURL extension] (http://php.net/manual/en/book.curl.php)
- PHP JSON extension
- [Composer] (https://github.com/composer/composer)
Developer Documentation
https://vipparcel.com/docs/api/
Dependence
- [Guzzle HTTP client] (https://github.com/guzzle/guzzle/)
Installation
Run the Composer command
composer require 'chenhaoran/vipparcel-client-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
Account > Balance
- [GET] VP_Request_Account_Balance_Current
- [GET] VP_Request_Account_Balance_History
Account > Personal Info
- [GET] VP_Request_Account_Personal_Details
- [PUT] VP_Request_Account_Personal_Update
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
Shipping > Pickup
- [GET] VP_Request_Shipping_Pickup_List
- [GET] VP_Request_Shipping_Pickup_Info
- [POST] VP_Request_Shipping_Pickup_Request
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
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
Shipping > Tracking
- [GET] VP_Request_Shipping_Tracking_Info
Location > Country
- [GET] VP_Request_Location_Country_List
Location > State
- [GET] VP_Request_Location_State_List