/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources
Edit: /home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources/Shipment.php (2708B)
tracking !== null;
}
/**
* Does this shipment offer a track and trace code?
*
* @return bool
*/
public function hasTrackingUrl()
{
return $this->hasTracking() && ! empty($this->tracking->url);
}
/**
* Retrieve the track and trace url. Returns null if there is no url available.
*
* @return string|null
*/
public function getTrackingUrl()
{
if (! $this->hasTrackingUrl()) {
return null;
}
return $this->tracking->url;
}
/**
* Get the line value objects
*
* @return OrderLineCollection
*/
public function lines()
{
return ResourceFactory::createBaseResourceCollection(
$this->client,
OrderLine::class,
$this->lines
);
}
/**
* Get the Order object for this shipment
*
* @return Order
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function order()
{
return $this->client->orders->get($this->orderId);
}
/**
* Save changes made to this shipment.
*
* @return BaseResource|Shipment
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function update()
{
$body = [
"tracking" => $this->tracking,
];
$result = $this->client->shipments->update($this->orderId, $this->id, $body);
return ResourceFactory::createFromApiResult($result, new Shipment($this->client));
}
}