Tracker
extends AbstractApiObject
in package
Tracker class allows you to monitor a shipment even though it wasn't created using shipcloud.
Trackers make it possible to track a shipment that wasn't created using shipcloud. They are basically a way to monitor shipments created elsewhere. All you have to do is provide us with the tracking number you received from the carrier as well as its corresponding name acronym.
Notice: Since we're always tracking shipments created using shipcloud contracts, trackers can only be used with your own carrier contracts.
Tags
Table of Contents
- $id : id
- $required : required
- $carrier : string
- acronym of the carrier the shipment was created with.
- $carrier_tracking_no : string
- Tracking number (provided by the carrier) of the shipment which should be monitored.
- $from : Address
- the senders address.
- $notification_email : string
- email address that we should notify once there's an update for this shipment.
- $to : Address
- the receivers address.
- __construct() : void
- Webhook constructor.
- get_carrier() : string
- Getter method for carrier.
- get_carrier_tracking_no() : string
- Getter method for carrier_tracking_no.
- get_from() : Address
- Getter method for from.
- get_id() : string|null
- Getter method for id.
- get_notification_email() : string
- Getter method for notification_email.
- get_required_fields() : array<string|int, mixed>
- Getter method for id.
- get_to() : Address
- Getter method for to.
- set_carrier() : void
- Setter method for carrier.
- set_carrier_tracking_no() : void
- Setter method for carrier_tracking_no.
- set_from() : void
- Setter method for from.
- set_id() : void
- Setter method for id.
- set_notification_email() : void
- Setter method for notification_email.
- set_to() : void
- Setter method for 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
$carrier
acronym of the carrier the shipment was created with.
private
string
$carrier
$carrier_tracking_no
Tracking number (provided by the carrier) of the shipment which should be monitored.
private
string
$carrier_tracking_no
$from
the senders address.
private
Address
$from
$notification_email
email address that we should notify once there's an update for this shipment.
private
string
$notification_email
$to
the receivers address.
private
Address
$to
Methods
__construct()
Webhook constructor.
public
__construct(string $carrier_tracking_no, string $carrier) : void
Parameters
- $carrier_tracking_no : string
- $carrier : string
Tags
Return values
void —get_carrier()
Getter method for carrier.
public
get_carrier() : string
Return values
string —The carrier.
get_carrier_tracking_no()
Getter method for carrier_tracking_no.
public
get_carrier_tracking_no() : string
Return values
string —The carrier_tracking_no.
get_from()
Getter method for from.
public
get_from() : Address
Return values
Address —The from.
get_id()
Getter method for id.
public
get_id() : string|null
Return values
string|null —The id.
get_notification_email()
Getter method for notification_email.
public
get_notification_email() : string
Return values
string —The notification_email.
get_required_fields()
Getter method for id.
public
get_required_fields() : array<string|int, mixed>
Return values
array<string|int, mixed> —The id.
get_to()
Getter method for to.
public
get_to() : Address
Return values
Address —The to.
set_carrier()
Setter method for carrier.
public
set_carrier(string $carrier) : void
Parameters
- $carrier : string
-
The carrier to set.
Tags
Return values
void —set_carrier_tracking_no()
Setter method for carrier_tracking_no.
public
set_carrier_tracking_no(string $carrier_tracking_no) : void
Parameters
- $carrier_tracking_no : string
-
The carrier_tracking_no to set.
Tags
Return values
void —set_from()
Setter method for from.
public
set_from(Address $from) : void
Parameters
- $from : Address
-
The from to set.
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_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_to()
Setter method for to.
public
set_to(Address $to) : void
Parameters
- $to : Address
-
The to to set.
Return values
void —to_array()
Getter method for parameter array.
public
to_array() : array<string|int, mixed>
Return values
array<string|int, mixed> —The class object as array.
to_string()
Getter method for string representation.
public
to_string() : string
Return values
string —The object as string representation.
