getSendPreferencesFromTaxAuthority
The getSendPreferencesFromTaxAuthority
method returns the default sending method and template defined by the tax authority for preparing an e-document for certification.
Input Parameters
Use these parameters to define the operation, subsidiary, and category to match with a tax authority.
Parameter |
Type |
Description |
---|---|---|
operationType |
String |
Operation used for certification, such as Send E-Document or Cancel. |
subsidiaryId |
String, Number |
Subsidiary internal ID. |
category |
String |
External ID of the e-document category. Accepted values:
|
Return Value
The method returns the tax authority’s preferred sending configuration.
Property |
Type |
Description |
---|---|---|
success |
Boolean |
Indicates whether the preferences were retrieved. |
message |
String |
Success or error message. |
defaultTemplate |
String |
Default template defined in the tax authority certification service. May be |
defaultSendingMethod |
String |
Default method used to send the e-document. May be |
Example
/**
* Lists the default sending method and default template from tax authority.
*
* @param {Object} context
* @returns {Object} result
*/
var getSendPreferencesFromTaxAuthority = function (context) {
var ecsApi = loadEcsApi();
return ecsApi.getSendPreferencesFromTaxAuthority(context, "");
};