Questo metodo può essere utilizzato aggiungere un'aliquota d'imposta all'interno del sistema.
I parametri richiesti da questa funzione sono:
In caso di successo ritorna un'intero che rappresenta l'id del'aliquota d'imposta.
In caso di errore il metodo genererà un'eccezione che riporterà uno dei seguenti codici di errore:
require "vendor/autoload.php" try { $ezPrintSDK = new ezPrintSDKWrapper('http://demo.ezprint.it'); $apiToken = $ezPrintSDK->cLoginAPI('1WHm0icsupAEm9fil9en','yCHZ0nKiyn1MU0DhpgmG'); $geographicalZones = $ezPrintSDK->backOffice->bGetGeographicalZones(); $availableLanguages = $ezPrintSDK->backOffice->bGetAvailableLanguages(); $customerGroups = $ezPrintSDK->backOffice->bGetCustomerGroups(false, $availableLanguages[0]['languageId']); $taxRateId = $ezPrintSDK->backOffice->bAddTaxRate("Test Tax", 20, "P", $geographicalZones[0]['geoZoneId'], false, [$customerGroups[0]['customerGroupId']]); } catch (Exception $e) { echo 'Error Code: ', $e->getMessage(); } |
try { var util = require('util'); var ezPrintSDK = require('ezprint-sdk-wrapper'); ezPrintSDK.initializeWrapper('http://demo.ezprint.it'); var apiToken = ezPrintSDK.cLoginAPI('1WHm0icsupAEm9fil9en','yCHZ0nKiyn1MU0DhpgmG'); var geographicalZones = ezPrintSDK.backOffice.bGetGeographicalZones(); var availableLanguages = ezPrintSDK.backOffice.bGetAvailableLanguages(); var customerGroups = ezPrintSDK.backOffice.bGetCustomerGroups(false, availableLanguages[0].languageId); var taxRateId = ezPrintSDK.backOffice.bAddTaxRate("Test Tax", 20, "P", geographicalZones[0].geoZoneId, false, [customerGroups[0].customerGroupId]); } catch (ex) { console.log(ex); } |
try { ezPrintSDKWrapper.Client ezPrintSDK = new ezPrintSDKWrapper.Client("http://demo.ezprint.it"); ezPrintSDK.cLoginAPI("1WHm0icsupAEm9fil9en","yCHZ0nKiyn1MU0DhpgmG"); List<ezPrintSDKWrapper.Structures.geographicalZoneItem> geographicalZones = ezPrintSDK.BackOffice.bGetGeographicalZones(); List<ezPrintSDKWrapper.Structures.languageItem> availableLanguages = ezPrintSDK.BackOffice.bGetAvailableLanguages(); List<ezPrintSDKWrapper.Structures.customerGroupItem> customerGroups = ezPrintSDK.BackOffice.bGetCustomerGroups(false, availableLanguages[0].languageId); int taxRateId = ezPrintSDK.BackOffice.bAddTaxRate("Test Tax", 20, ezPrintSDKWrapper.Structures.taxRateType.typePercentage, geographicalZones[0].geoZoneId, false, new int[] {customerGroups[0].customerGroupId}); } catch (ezPrintException ex) { string ErrorMessage = ex.Message; } |