Shipment
extends AbstractApiObject
in package
Shipment class
Tags
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
$id
protected
id
$id
$required
protected
required
$required
$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
$customs_declaration
Declaration of customs related information.
private
CustomsDeclaration
$customs_declaration
$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
$incoterm
private
string
$incoterm
$label
Label characteristics.
private
Label
$label
$label_voucher
Label voucher characteristics.
private
LabelVoucher
$label_voucher
$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
$package
private
Package
$package
$pickup
Pickup request for this shipment.
private
Pickup
$pickup
$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
$to
The receivers address.
private
Address
$to
Methods
__construct()
Properties constructor.
public
__construct(string $carrier, Address $to, Package $package[, CustomsDeclaration $customs_declaration = null ]) : void
Parameters
- $carrier : string
- $to : Address
- $package : Package
- $customs_declaration : CustomsDeclaration = null
Tags
Return values
void —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
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_customs_declaration()
Getter method for customs declaration.
public
get_customs_declaration() : CustomsDeclaration
Tags
Return values
CustomsDeclaration —The customs declaration.
get_description()
Getter method for description.
public
get_description() : string
Return values
string —The description.
get_from()
Getter method for sender address (from).
public
get_from() : Address
Tags
Return values
Address —The sender address.
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
Return values
string —The incoterm.
get_label()
Getter method for label.
public
get_label() : Label
Tags
Return values
Label —The label.
get_label_voucher()
Getter method for label voucher.
public
get_label_voucher() : LabelVoucher
Tags
Return values
LabelVoucher —The label voucher.
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_package()
Getter method for package.
public
get_package() : Package
Tags
Return values
Package —The package.
get_pickup()
Getter method for pickup.
public
get_pickup() : Pickup
Tags
Return values
Pickup —The pickup.
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
Return values
string —The service.
get_to()
Getter method for receiver address (to).
public
get_to() : Address
Tags
Return values
Address —The receiver address.
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
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
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_customs_declaration()
Setter method for customs declaration.
public
set_customs_declaration(CustomsDeclaration $customs_declaration) : void
Parameters
- $customs_declaration : CustomsDeclaration
-
The customs declaration to set.
Tags
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
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
Return values
void —set_label()
Setter method for label.
public
set_label(Label $label) : void
Parameters
- $label : Label
-
The label to set.
Tags
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
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_package()
Setter method for package.
public
set_package(Package $package) : void
Parameters
- $package : Package
-
The package to set.
Tags
Return values
void —set_pickup()
Setter method for pickup.
public
set_pickup(Pickup $pickup) : void
Parameters
- $pickup : Pickup
-
The pickup to set.
Tags
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
Return values
void —set_to()
Setter method for receiver address (to).
public
set_to(Address $to) : void
Parameters
- $to : Address
-
The receiver address to set.
Tags
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.
