shipcloud PHP Client

Shipment extends AbstractApiObject

Shipment class

Tags
category

Class

author

Daniel Muenter info@msltns.com

version
0.0.1
since
0.0.1
license

GPL 3 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Table of Contents

$id  : id
$required  : required
$additional_services  : array<string|int, mixed>
$carrier  : string
Acronym of the carrier you want to use.
$cover_address  : Address
The cover address. Overwrites the sender address on the shipping label.
$create_shipping_label  : bool
Determines if a shipping label should be created at the carrier (this means you will be charged when using the production api key).
$customs_declaration  : CustomsDeclaration
Declaration of customs related information.
$description  : string
Text that describes the contents of the shipment. This parameter is mandatory if you're using UPS and the following conditions are true: from and to countries are not the same; from and/or to countries are not in the EU; from and to countries are in the EU and the shipments service is not 'standard'. The parameter is also mandatory when using DHL Express as carrier.
$from  : Address
The senders address. If missing, the default sender address (if defined in your shipcloud account) will be used.
$incoterm  : string
$label  : Label
Label characteristics.
$label_voucher  : LabelVoucher
Label voucher characteristics.
$metadata  : object
Here you can save additional data that you want to be associated with the shipment. Any combination of key-value pairs is possible.
$notification_email  : string
Email address that we should notify once there's an update for this shipment.
$package  : Package
$pickup  : Pickup
Pickup request for this shipment.
$reference_number  : string
A reference number (max. 30 characters) that you want this shipment to be identified with. You can use this afterwards to easier find the shipment in the shipcloud.io backoffice.
$service  : string
The service that should be used for the shipment.
$to  : Address
The receivers address.
__construct()  : void
Properties constructor.
get_additional_services()  : array<string|int, mixed>
Getter method for additional services.
get_carrier()  : string
Getter method for carrier.
get_cover_address()  : Address
Getter method for cover address.
get_create_shipping_label()  : bool
Getter method for create_shipping_label.
get_customs_declaration()  : CustomsDeclaration
Getter method for customs declaration.
get_description()  : string
Getter method for description.
get_from()  : Address
Getter method for sender address (from).
get_id()  : string|null
Getter method for id.
get_incoterm()  : string
Getter method for incoterm.
get_label()  : Label
Getter method for label.
get_label_voucher()  : LabelVoucher
Getter method for label voucher.
get_metadata()  : object
Getter method for metadata.
get_notification_email()  : string
Getter method for notification email.
get_package()  : Package
Getter method for package.
get_pickup()  : Pickup
Getter method for pickup.
get_reference_number()  : string
Getter method for reference number.
get_required_fields()  : array<string|int, mixed>
Getter method for id.
get_service()  : string
Getter method for service.
get_to()  : Address
Getter method for receiver address (to).
set_additional_services()  : void
Setter method for additional services.
set_carrier()  : void
Setter method for carrier.
set_cover_address()  : void
Setter method for cover address.
set_create_shipping_label()  : void
Setter method for create_shipping_label.
set_customs_declaration()  : void
Setter method for customs declaration.
set_description()  : void
Setter method for description.
set_from()  : void
Setter method for sender address (from).
set_id()  : void
Setter method for id.
set_incoterm()  : void
Setter method for incoterm.
set_label()  : void
Setter method for label.
set_label_voucher()  : void
Setter method for label voucher.
set_metadata()  : void
Setter method for metadata.
set_notification_email()  : void
Setter method for notification email.
set_package()  : void
Setter method for package.
set_pickup()  : void
Setter method for pickup.
set_reference_number()  : void
Setter method for reference number.
set_service()  : void
Setter method for service.
set_to()  : void
Setter method for receiver address (to).
to_array()  : array<string|int, mixed>
Getter method for parameter array.
to_string()  : string
Getter method for string representation.

Properties

$additional_services

private array<string|int, mixed> $additional_services

$carrier

Acronym of the carrier you want to use.

private string $carrier

$cover_address

The cover address. Overwrites the sender address on the shipping label.

private Address $cover_address

$create_shipping_label

Determines if a shipping label should be created at the carrier (this means you will be charged when using the production api key).

private bool $create_shipping_label

$description

Text that describes the contents of the shipment. This parameter is mandatory if you're using UPS and the following conditions are true: from and to countries are not the same; from and/or to countries are not in the EU; from and to countries are in the EU and the shipments service is not 'standard'. The parameter is also mandatory when using DHL Express as carrier.

private string $description

$from

The senders address. If missing, the default sender address (if defined in your shipcloud account) will be used.

private Address $from

$metadata

Here you can save additional data that you want to be associated with the shipment. Any combination of key-value pairs is possible.

private object $metadata

$notification_email

Email address that we should notify once there's an update for this shipment.

private string $notification_email

$reference_number

A reference number (max. 30 characters) that you want this shipment to be identified with. You can use this afterwards to easier find the shipment in the shipcloud.io backoffice.

private string $reference_number

$service

The service that should be used for the shipment.

private string $service

Methods

get_additional_services()

Getter method for additional services.

public get_additional_services() : array<string|int, mixed>
Return values
array<string|int, mixed>

The additional services.

get_carrier()

Getter method for carrier.

public get_carrier() : string
Return values
string

The carrier.

get_cover_address()

Getter method for cover address.

public get_cover_address() : Address
Tags
see
Address
Return values
Address

The cover address.

get_create_shipping_label()

Getter method for create_shipping_label.

public get_create_shipping_label() : bool
Return values
bool

The create_shipping_label.

get_description()

Getter method for description.

public get_description() : string
Return values
string

The description.

get_id()

Getter method for id.

public get_id() : string|null
Return values
string|null

The id.

get_incoterm()

Getter method for incoterm.

public get_incoterm() : string
Tags
see
ServiceType
Return values
string

The incoterm.

get_metadata()

Getter method for metadata.

public get_metadata() : object
Return values
object

The metadata.

get_notification_email()

Getter method for notification email.

public get_notification_email() : string
Return values
string

The notification email.

get_reference_number()

Getter method for reference number.

public get_reference_number() : string
Return values
string

The reference number.

get_required_fields()

Getter method for id.

public get_required_fields() : array<string|int, mixed>
Return values
array<string|int, mixed>

The id.

get_service()

Getter method for service.

public get_service() : string
Tags
see
ServiceType
Return values
string

The service.

set_additional_services()

Setter method for additional services.

public set_additional_services(array<string|int, mixed> $additional_services) : void
Parameters
$additional_services : array<string|int, mixed>

The additional services to set.

Return values
void

set_carrier()

Setter method for carrier.

public set_carrier(string $carrier) : void
Parameters
$carrier : string

The carrier to set.

Tags
see
CarrierType
throws
ApiException
Return values
void

set_cover_address()

Setter method for cover address.

public set_cover_address(Address $cover_address) : void
Parameters
$cover_address : Address

The cover address to set.

Tags
see
Address
Return values
void

set_create_shipping_label()

Setter method for create_shipping_label.

public set_create_shipping_label(bool $create_shipping_label) : void
Parameters
$create_shipping_label : bool

The create_shipping_label to set.

Return values
void

set_description()

Setter method for description.

public set_description(string $description) : void
Parameters
$description : string

The description to set.

Return values
void

set_from()

Setter method for sender address (from).

public set_from(Address $from) : void
Parameters
$from : Address

The sender address to set.

Tags
see
Address
Return values
void

set_id()

Setter method for id.

public set_id(string $id) : void
Parameters
$id : string

The id to set.

Return values
void

set_incoterm()

Setter method for incoterm.

public set_incoterm(string $incoterm) : void
Parameters
$incoterm : string

The incoterm to set.

Tags
see
IncotermType
throws
ApiException
Return values
void

set_label()

Setter method for label.

public set_label(Label $label) : void
Parameters
$label : Label

The label to set.

Tags
see
Label
Return values
void

set_label_voucher()

Setter method for label voucher.

public set_label_voucher(Label $label_voucher) : void
Parameters
$label_voucher : Label

The label voucher to set.

Tags
see
LabelVoucher
Return values
void

set_metadata()

Setter method for metadata.

public set_metadata(object $metadata) : void
Parameters
$metadata : object

The metadata to set.

Return values
void

set_notification_email()

Setter method for notification email.

public set_notification_email(string $notification_email) : void
Parameters
$notification_email : string

The notification email to set.

Return values
void

set_pickup()

Setter method for pickup.

public set_pickup(Pickup $pickup) : void
Parameters
$pickup : Pickup

The pickup to set.

Tags
see
Pickup
Return values
void

set_reference_number()

Setter method for reference number.

public set_reference_number(string $reference_number) : void
Parameters
$reference_number : string

The reference number to set.

Return values
void

set_service()

Setter method for service.

public set_service(string $service) : void
Parameters
$service : string

The service to set.

Tags
see
ServiceType
throws
ApiException
Return values
void

to_array()

Getter method for parameter array.

public to_array() : array<string|int, mixed>
Return values
array<string|int, mixed>

The address object as array.

to_string()

Getter method for string representation.

public to_string() : string
Return values
string

The object as string representation.

Search results