Skip to content

Latest commit

 

History

History
145 lines (102 loc) · 5.21 KB

TaxRatesApi.md

File metadata and controls

145 lines (102 loc) · 5.21 KB

TheLogicStudio\CodatPHP\TaxRatesApi

All URIs are relative to https://api.codat.io, except if the operation defines another base path.

Method HTTP request Description
companiesCompanyIdDataTaxRatesGet() GET /companies/{companyId}/data/taxRates Gets the latest tax rates for a given company.
companiesCompanyIdDataTaxRatesTaxRateIdGet() GET /companies/{companyId}/data/taxRates/{taxRateId} Gets the specified tax rate for a given company.

companiesCompanyIdDataTaxRatesGet()

companiesCompanyIdDataTaxRatesGet($company_id, $page, $page_size, $query, $order_by): \TheLogicStudio\CodatPHP\Model\CodatDataContractsDatasetsTaxRatePagedResponseModel

Gets the latest tax rates for a given company.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\TaxRatesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$company_id = 'company_id_example'; // string
$page = 1; // int
$page_size = 100; // int
$query = 'query_example'; // string
$order_by = 'order_by_example'; // string

try {
    $result = $apiInstance->companiesCompanyIdDataTaxRatesGet($company_id, $page, $page_size, $query, $order_by);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRatesApi->companiesCompanyIdDataTaxRatesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id string
page int [default to 1]
page_size int [optional] [default to 100]
query string [optional]
order_by string [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatDataContractsDatasetsTaxRatePagedResponseModel

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

companiesCompanyIdDataTaxRatesTaxRateIdGet()

companiesCompanyIdDataTaxRatesTaxRateIdGet($company_id, $tax_rate_id): \TheLogicStudio\CodatPHP\Model\CodatDataContractsDatasetsTaxRate

Gets the specified tax rate for a given company.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\TaxRatesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$company_id = 'company_id_example'; // string
$tax_rate_id = 'tax_rate_id_example'; // string

try {
    $result = $apiInstance->companiesCompanyIdDataTaxRatesTaxRateIdGet($company_id, $tax_rate_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRatesApi->companiesCompanyIdDataTaxRatesTaxRateIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id string
tax_rate_id string

Return type

\TheLogicStudio\CodatPHP\Model\CodatDataContractsDatasetsTaxRate

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]