2023-03-19 10:10:20 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\DataMapper\Tax\ZipTax;
|
|
|
|
|
|
|
|
class Response
|
|
|
|
{
|
|
|
|
public string $version = 'v40';
|
|
|
|
|
|
|
|
public int $rCode = 100;
|
|
|
|
|
|
|
|
/**
|
2023-03-24 03:56:26 +01:00
|
|
|
* [
|
2023-03-19 10:10:20 +01:00
|
|
|
* "geoPostalCode" => "92582",
|
|
|
|
* "geoCity" => "SAN JACINTO",
|
|
|
|
* "geoCounty" => "RIVERSIDE",
|
|
|
|
* "geoState" => "CA",
|
|
|
|
* "taxSales" => 0.0875,
|
|
|
|
* "taxUse" => 0.0875,
|
|
|
|
* "txbService" => "N",
|
|
|
|
* "txbFreight" => "N",
|
|
|
|
* "stateSalesTax" => 0.06,
|
|
|
|
* "stateUseTax" => 0.06,
|
|
|
|
* "citySalesTax" => 0.01,
|
|
|
|
* "cityUseTax" => 0.01,
|
|
|
|
* "cityTaxCode" => "874",
|
|
|
|
* "countySalesTax" => 0.0025,
|
|
|
|
* "countyUseTax" => 0.0025,
|
|
|
|
* "countyTaxCode" => "",
|
|
|
|
* "districtSalesTax" => 0.015,
|
|
|
|
* "districtUseTax" => 0.015,
|
|
|
|
* "district1Code" => "26",
|
|
|
|
* "district1SalesTax" => 0,
|
|
|
|
* "district1UseTax" => 0,
|
|
|
|
* "district2Code" => "26",
|
|
|
|
* "district2SalesTax" => 0.005,
|
|
|
|
* "district2UseTax" => 0.005,
|
|
|
|
* "district3Code" => "",
|
|
|
|
* "district3SalesTax" => 0,
|
|
|
|
* "district3UseTax" => 0,
|
|
|
|
* "district4Code" => "33",
|
|
|
|
* "district4SalesTax" => 0.01,
|
|
|
|
* "district4UseTax" => 0.01,
|
|
|
|
* "district5Code" => "",
|
|
|
|
* "district5SalesTax" => 0,
|
|
|
|
* "district5UseTax" => 0,
|
|
|
|
* "originDestination" => "D",
|
2023-03-24 03:56:26 +01:00
|
|
|
*
|
2023-03-19 10:10:20 +01:00
|
|
|
* ];
|
2023-03-24 03:56:26 +01:00
|
|
|
*
|
2023-03-19 10:10:20 +01:00
|
|
|
*/
|
2023-03-24 03:56:26 +01:00
|
|
|
|
2023-03-24 06:43:09 +01:00
|
|
|
public string $geoPostalCode = "";
|
|
|
|
public string $geoCity = "";
|
|
|
|
public string $geoCounty = "";
|
|
|
|
public string $geoState = "";
|
|
|
|
public float $taxSales = 0;
|
|
|
|
public float $taxUse = 0;
|
2023-03-24 08:02:34 +01:00
|
|
|
public string $txbService = ""; // N = No, Y = Yes
|
|
|
|
public string $txbFreight = ""; // N = No, Y = Yes
|
2023-03-24 06:43:09 +01:00
|
|
|
public float $stateSalesTax = 0;
|
|
|
|
public float $stateUseTax = 0;
|
|
|
|
public float $citySalesTax = 0;
|
|
|
|
public float $cityUseTax = 0;
|
|
|
|
public string $cityTaxCode = "";
|
|
|
|
public float $countySalesTax = 0;
|
|
|
|
public float $countyUseTax = 0;
|
2023-03-24 03:56:26 +01:00
|
|
|
public string $countyTaxCode = "";
|
2023-03-24 06:43:09 +01:00
|
|
|
public float $districtSalesTax = 0;
|
|
|
|
public float $districtUseTax = 0;
|
|
|
|
public string $district1Code = "";
|
2023-03-24 03:56:26 +01:00
|
|
|
public float $district1SalesTax = 0;
|
|
|
|
public float $district1UseTax = 0;
|
2023-03-24 06:43:09 +01:00
|
|
|
public string $district2Code = "";
|
|
|
|
public float $district2SalesTax = 0;
|
|
|
|
public float $district2UseTax = 0;
|
2023-03-24 03:56:26 +01:00
|
|
|
public string $district3Code = "";
|
|
|
|
public float $district3SalesTax = 0;
|
|
|
|
public float $district3UseTax = 0;
|
2023-03-24 06:43:09 +01:00
|
|
|
public string $district4Code = "";
|
|
|
|
public float $district4SalesTax = 0;
|
|
|
|
public float $district4UseTax = 0;
|
2023-03-24 03:56:26 +01:00
|
|
|
public string $district5Code = "";
|
|
|
|
public float $district5SalesTax = 0;
|
|
|
|
public float $district5UseTax = 0;
|
2023-03-24 06:43:09 +01:00
|
|
|
public string $originDestination = "";
|
|
|
|
|
2023-03-24 08:58:59 +01:00
|
|
|
public function __construct($data)
|
2023-03-24 06:43:09 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
foreach($data as $key => $value){
|
|
|
|
$this->{$key} = $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2023-03-19 10:10:20 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|