forked from comyo-media/shipcloud-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
27 lines (22 loc) · 676 Bytes
/
example.php
File metadata and controls
27 lines (22 loc) · 676 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
<?php
require 'vendor/autoload.php';
$shipcloud = new ComyoMedia\Shipcloud\Shipcloud('api-key');
// Find Shipment By Id
// var_dump($shipcloud->shipments()->find('shipment-id'));
// List all carriers
// var_dump($shipcloud->carriers()->all());
try {
var_dump($shipcloud->addresses()->create([
'company' => 'company name',
'first_name' => 'first name',
'last_name' => 'lastname',
'street' => 'street',
'street_no' => 'street_no',
'zip_code' => 'zip_code',
'city' => 'city',
'country' => 'country',
'phone' => 'phone'
]));
} catch(\Exception $e) {
var_dump($e);
}