@facturacr/atv-sdk
Version:
Librería (SDK) de Javascript/NodeJS para acceder al API de Administración Tributaria Virtual (ATV) del Ministerio de Hacienda.
58 lines (57 loc) • 1.58 kB
TypeScript
import { PersonProps } from '@src/ATV/core/Person';
import { DocumentNames } from '@src/ATV/core/documentNames.types';
import { Document } from '@src/ATV/core/Document';
import { ReferenceInformationProps } from './ReferenceInformation';
import { ReceptorMessageProps } from './types';
type PersonInput = PersonProps;
type TaxInput = {
code: string;
rateCode: string;
rate: number;
amount?: number;
};
type OrderInput = {
detail: string;
unitaryPrice: number;
lineNumber?: string;
code?: string;
quantity?: number;
measureUnit?: string;
totalAmount?: number;
subTotal?: number;
tax?: TaxInput;
totalOrderLineAmount?: number;
};
type DocumentInput = {
emitter: PersonInput;
receiver: PersonInput;
branch: string;
terminal: string;
documentName: DocumentNames;
countryCode: string;
securityCode: string;
activityCode: string;
consecutiveIdentifier: string;
ceSituation: string;
orderLines: OrderInput[];
referenceInfo?: ReferenceInfoInput;
conditionSale: string;
paymentMethod: string;
};
type ReferenceInfoInput = ReferenceInformationProps;
export type CreateDocumentInput = {
document: DocumentInput;
token: string;
receptorMessageProps?: ReceptorMessageProps;
signatureOptions: {
buffer: string;
password: string;
};
};
export declare class CreateDocFactory {
createDocument(document: CreateDocumentInput['document']): Document;
private createOrderLines;
private createFullConsecutive;
private createClave;
}
export {};