|
|
|
@ -9,6 +9,8 @@ class TrackingInfo {
|
|
|
|
|
private $from = null;
|
|
|
|
|
private $to = null;
|
|
|
|
|
private $current_status = null;
|
|
|
|
|
private $carrierImageUrl = "";
|
|
|
|
|
private $attributionText = "";
|
|
|
|
|
|
|
|
|
|
public function __construct($code = null, $carrier = null, $to = null, $from = null, $current_status = null, $history = null) {
|
|
|
|
|
$this->code = $code;
|
|
|
|
@ -19,6 +21,14 @@ class TrackingInfo {
|
|
|
|
|
$this->history = $history;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setCarrierLogo(string $url) {
|
|
|
|
|
$this->carrierImageUrl = $url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setCarrierAttributionText(string $text) {
|
|
|
|
|
$this->attributionText = $text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setCode(string $code) {
|
|
|
|
|
$this->code = $code;
|
|
|
|
|
}
|
|
|
|
@ -84,7 +94,9 @@ class TrackingInfo {
|
|
|
|
|
"code" => $this->getCode(),
|
|
|
|
|
"carrier" => [
|
|
|
|
|
"code" => Carriers::getCarrierCode($this->getCarrier()),
|
|
|
|
|
"name" => Carriers::getCarrierName($this->getCarrier())
|
|
|
|
|
"name" => Carriers::getCarrierName($this->getCarrier()),
|
|
|
|
|
"attribution" => $this->attributionText,
|
|
|
|
|
"logo" => $this->carrierImageUrl
|
|
|
|
|
],
|
|
|
|
|
"service" => [
|
|
|
|
|
"id" => $this->service->id,
|
|
|
|
|