Constructor
# new DGII(apiKey)
Constructor for DGII class.
Parameters:
Name | Type | Description |
---|---|---|
apiKey |
string
|
The API key used for authentication with the DGII API. |
Extends
- FetchService
Methods
# async callSoapOperation(operation, requestXml) → {Promise.<Object>}
Calls a SOAP operation with the provided operation name and request XML.
Handles constructing the SOAP request, sending it, and parsing the response.
Parameters:
Name | Type | Description |
---|---|---|
operation |
string
|
The name of the SOAP operation to call. |
requestXml |
string
|
The SOAP request XML for the operation. |
- Throws an error if there is an issue with the SOAP operation.
Error
- A Promise that resolves to the SOAP response.
Promise.<Object>
# getContribuyentes(rnc) → {Promise.<Object>}
Retrieves taxpayer information based on the provided RNC (Registro Nacional de Contribuyentes).
Parameters:
Name | Type | Description |
---|---|---|
rnc |
string
|
The RNC for the taxpayer. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getContribuyentesCount(rnc) → {Promise.<Object>}
Retrieves the count of taxpayers based on the provided RNC.
Parameters:
Name | Type | Description |
---|---|---|
rnc |
string
|
The RNC for the taxpayer. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getDocumento(codigoBusqueda, patronBusqueda, IMEI) → {Promise.<Object>}
Retrieves document information based on the provided search parameters.
Parameters:
Name | Type | Description |
---|---|---|
codigoBusqueda |
string
|
The code for the search. |
patronBusqueda |
string
|
The search pattern. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getNCF(RNC, NCF, IMEI) → {Promise.<Object>}
Retrieves NCF (Número de Comprobante Fiscal) information based on the provided RNC, NCF, and IMEI.
Parameters:
Name | Type | Description |
---|---|---|
RNC |
string
|
The RNC for the taxpayer. |
NCF |
string
|
The NCF for the transaction. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getNCF2(RNC, NCF, rncComprador, codSeguridad, IMEI) → {Promise.<Object>}
Retrieves additional NCF (Número de Comprobante Fiscal) information based on extended parameters.
Parameters:
Name | Type | Description |
---|---|---|
RNC |
string
|
The RNC for the taxpayer. |
NCF |
string
|
The NCF for the transaction. |
rncComprador |
string
|
The RNC of the buyer. |
codSeguridad |
string
|
The security code. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getPlaca(RNC, Placa, IMEI) → {Promise.<Object>}
Retrieves vehicle plate information based on the provided RNC, plate, and IMEI.
Parameters:
Name | Type | Description |
---|---|---|
RNC |
string
|
The RNC for the taxpayer. |
Placa |
string
|
The vehicle plate. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getSolicitud(RNC, solicitud, IMEI) → {Promise.<Object>}
Retrieves information for a specific solicitud (request) based on the provided RNC, solicitud, and IMEI.
Parameters:
Name | Type | Description |
---|---|---|
RNC |
string
|
The RNC for the taxpayer. |
solicitud |
string
|
The solicitud (request) identifier. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>
# getVehiculoPorDATAMATRIX(value, IMEI) → {Promise.<Object>}
Retrieves vehicle information based on the provided DATAMATRIX value.
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
The DATAMATRIX value for the vehicle. |
IMEI |
string
|
The IMEI (International Mobile Equipment Identity) value. |
- A Promise that resolves to the SOAP response for the operation.
Promise.<Object>