30 lines
584 B
PHP
30 lines
584 B
PHP
<?php
|
|
|
|
namespace Intuit\Response;
|
|
|
|
use Illuminate\Support\Collection;
|
|
use Intuit\Models\Taxcode as TaxcodeModel;
|
|
|
|
/**
|
|
* This is an Invoice Intuit Response to API calls
|
|
*/
|
|
class Taxcode extends Base
|
|
{
|
|
protected const LOGKEY = 'RTI';
|
|
|
|
public function __construct(object $response)
|
|
{
|
|
parent::__construct($response);
|
|
|
|
if (object_get($response,'time'))
|
|
unset($response->time);
|
|
|
|
$this->_model = new TaxcodeModel((array)$response);
|
|
}
|
|
|
|
public function getTaxRateRef(): Collection
|
|
{
|
|
return collect($this->SalesTaxRateList->TaxRateDetail)
|
|
->pluck('TaxRateRef.value');
|
|
}
|
|
} |