-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
31 lines (27 loc) · 822 Bytes
/
example.php
File metadata and controls
31 lines (27 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require_once __DIR__.'/vendor/autoload.php';
use EasyParcel\ClientFactory;
use GuzzleHttp\Client as HttpClient;
$apiKey = 'sample_api_key';
$client = ClientFactory::make($apiKey)
->action('EPRateCheckingBulk')
->useSandbox()
->setup([
'bulk' => [
[
'pick_code' => '10050',
'pick_state' => 'png',
'pick_country' => 'MY',
'send_code' => '11950',
'send_state' => 'png',
'send_country' => 'MY',
'weight' => '5',
'width' => '0',
'length' => '0',
'height' => '0',
'date_coll' => '2017-11-08',
],
],
]);
var_dump($client->dispatch());
var_dump($client->getTaskHandler()->getEndpoint());