for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LAShowroom\TaxJarBundle\Model\Response;
class TaxResponse
{
/**
* @var float
*/
private $totalAmount;
private $shipping;
private $taxableAmount;
private $amountToCollect;
private $rate;
* @var bool
private $hasNexus;
private $freightTaxable;
* @var string
private $taxSource;
* @var TaxBreakdown
private $taxBreakdown;
public function __construct(\stdClass $response)
$this->totalAmount = $response->order_total_amount;
$this->shipping = $response->shipping;
$this->taxableAmount = $response->taxable_amount;
$this->amountToCollect = $response->amount_to_collect;
$this->rate = $response->rate;
$this->hasNexus = (bool) $response->has_nexus;
$this->freightTaxable = (bool) $response->freight_taxable;
$this->taxSource = $response->tax_source;
$this->taxBreakdown = new TaxBreakdown($response->breakdown);
}
* @return float
public function getTotalAmount()
return $this->totalAmount;
public function getShipping()
return $this->shipping;
public function getTaxableAmount()
return $this->taxableAmount;
public function getAmountToCollect()
return $this->amountToCollect;
public function getRate()
return $this->rate;
* @return bool
public function hasNexus()
return $this->hasNexus;
public function isFreightTaxable()
return $this->freightTaxable;
* @return string
public function getTaxSource()
return $this->taxSource;
* @return TaxBreakdown
public function getTaxBreakdown()
return $this->taxBreakdown;