osb/app/Interfaces/ProductItem.php

57 lines
1021 B
PHP

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