PHP Class Mpociot\VatCalculator\Http\Controller

Inheritance: extends Illuminate\Routing\Controller
Datei anzeigen Open project: mpociot/vat-calculator

Public Methods

Method Description
__construct ( VatCalculator $calculator )
calculateGrossPrice ( Illuminate\Http\Request $request ) : Illuminate\Http\Response Returns the tax rate for the given country.
getCountryCode ( ) : Illuminate\Http\Response Returns the tax rate for the given country.
getTaxRateForLocation ( $countryCode = null, $postalCode = null ) : Illuminate\Http\Response Returns the tax rate for the given country code and postal code.
validateVATID ( string $vat_id ) : Illuminate\Http\Response Returns the tax rate for the given country.

Method Details

__construct() public method

public __construct ( VatCalculator $calculator )
$calculator Mpociot\VatCalculator\VatCalculator

calculateGrossPrice() public method

Returns the tax rate for the given country.
public calculateGrossPrice ( Illuminate\Http\Request $request ) : Illuminate\Http\Response
$request Illuminate\Http\Request
return Illuminate\Http\Response

getCountryCode() public method

Returns the tax rate for the given country.
public getCountryCode ( ) : Illuminate\Http\Response
return Illuminate\Http\Response

getTaxRateForLocation() public method

Returns the tax rate for the given country code and postal code.
public getTaxRateForLocation ( $countryCode = null, $postalCode = null ) : Illuminate\Http\Response
return Illuminate\Http\Response

validateVATID() public method

Returns the tax rate for the given country.
public validateVATID ( string $vat_id ) : Illuminate\Http\Response
$vat_id string
return Illuminate\Http\Response