2021-12-24 01:14:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Interfaces;
|
|
|
|
|
2022-02-01 05:40:46 +00:00
|
|
|
use Illuminate\Support\Collection;
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
interface ProductItem
|
|
|
|
{
|
2022-02-01 05:40:46 +00:00
|
|
|
public function product();
|
2021-12-24 01:14:01 +00:00
|
|
|
|
2022-02-01 05:40:46 +00:00
|
|
|
public function supplied();
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Return the traffic inclusion with the service
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return mixed
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
2022-02-01 05:40:46 +00:00
|
|
|
public function allowance(): Collection;
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Render the traffic inclusion as a string
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return mixed
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
2022-02-01 05:40:46 +00:00
|
|
|
public function allowance_string(): string;
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Return the contract term for this product when sold as a service
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return int Months
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
|
|
|
public function getContractTermAttribute(): int;
|
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Return the product cost
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return float
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
2022-02-01 05:40:46 +00:00
|
|
|
public function getCostAttribute(): float;
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Return the supplier class
|
|
|
|
* If there is a model relationship return:
|
|
|
|
* return $this->getRelationValue('supplier');
|
|
|
|
* otherwise return a stdClass with name
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return mixed
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
2022-02-01 05:40:46 +00:00
|
|
|
public function getSupplierAttribute();
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-01 05:40:46 +00:00
|
|
|
* Does this offering capture usage information
|
2021-12-24 01:14:01 +00:00
|
|
|
*
|
2022-02-01 05:40:46 +00:00
|
|
|
* @return bool
|
2021-12-24 01:14:01 +00:00
|
|
|
*/
|
2022-02-01 05:40:46 +00:00
|
|
|
public function hasUsage(): bool;
|
2021-12-24 01:14:01 +00:00
|
|
|
}
|