/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources
Edit: /home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources/OrderLine.php (8508B)
_links->productUrl)) {
return null;
}
return $this->_links->productUrl;
}
/**
* Get the image URL of the product sold.
*
* @return string|null
*/
public function getImageUrl()
{
if (empty($this->_links->imageUrl)) {
return null;
}
return $this->_links->imageUrl;
}
/**
* Is this order line created?
*
* @return bool
*/
public function isCreated()
{
return $this->status === OrderLineStatus::STATUS_CREATED;
}
/**
* Is this order line paid for?
*
* @return bool
*/
public function isPaid()
{
return $this->status === OrderLineStatus::STATUS_PAID;
}
/**
* Is this order line authorized?
*
* @return bool
*/
public function isAuthorized()
{
return $this->status === OrderLineStatus::STATUS_AUTHORIZED;
}
/**
* Is this order line canceled?
*
* @return bool
*/
public function isCanceled()
{
return $this->status === OrderLineStatus::STATUS_CANCELED;
}
/**
* (Deprecated) Is this order line refunded?
* @deprecated 2018-11-27
*
* @return bool
*/
public function isRefunded()
{
return $this->status === OrderLineStatus::STATUS_REFUNDED;
}
/**
* Is this order line shipping?
*
* @return bool
*/
public function isShipping()
{
return $this->status === OrderLineStatus::STATUS_SHIPPING;
}
/**
* Is this order line completed?
*
* @return bool
*/
public function isCompleted()
{
return $this->status === OrderLineStatus::STATUS_COMPLETED;
}
/**
* Is this order line for a physical product?
*
* @return bool
*/
public function isPhysical()
{
return $this->type === OrderLineType::TYPE_PHYSICAL;
}
/**
* Is this order line for applying a discount?
*
* @return bool
*/
public function isDiscount()
{
return $this->type === OrderLineType::TYPE_DISCOUNT;
}
/**
* Is this order line for a digital product?
*
* @return bool
*/
public function isDigital()
{
return $this->type === OrderLineType::TYPE_DIGITAL;
}
/**
* Is this order line for applying a shipping fee?
*
* @return bool
*/
public function isShippingFee()
{
return $this->type === OrderLineType::TYPE_SHIPPING_FEE;
}
/**
* Is this order line for store credit?
*
* @return bool
*/
public function isStoreCredit()
{
return $this->type === OrderLineType::TYPE_STORE_CREDIT;
}
/**
* Is this order line for a gift card?
*
* @return bool
*/
public function isGiftCard()
{
return $this->type === OrderLineType::TYPE_GIFT_CARD;
}
/**
* Is this order line for a surcharge?
*
* @return bool
*/
public function isSurcharge()
{
return $this->type === OrderLineType::TYPE_SURCHARGE;
}
/**
* Update an orderline by supplying one or more parameters in the data array
*
* @return BaseResource
*/
public function update()
{
$result = $this->client->orderLines->update($this->orderId, $this->id, $this->getUpdateData());
return ResourceFactory::createFromApiResult($result, new Order($this->client));
}
/**
* Get sanitized array of order line data
*
* @return array
*/
public function getUpdateData()
{
$data = [
"name" => $this->name,
'imageUrl' => $this->imageUrl,
'productUrl' => $this->productUrl,
'metadata' => $this->metadata,
'sku' => $this->sku,
'quantity' => $this->quantity,
'unitPrice' => $this->unitPrice,
'discountAmount' => $this->discountAmount,
'totalAmount' => $this->totalAmount,
'vatAmount' => $this->vatAmount,
'vatRate' => $this->vatRate,
];
// Explicitly filter only NULL values to keep "vatRate => 0" intact
return array_filter($data, function ($value) {
return $value !== null;
});
}
}