FinOpenPOS
API ReferenceClasses

TaxId

@finopenpos/fiscal / TaxId

Defined in: value-objects/tax-id.ts:14

Immutable wrapper for CPF or CNPJ with formatting and XML helpers.

Constructors

Constructor

new TaxId(value): TaxId;

Defined in: value-objects/tax-id.ts:15

Parameters

ParameterType
valuestring

Returns

TaxId

Methods

isCnpj()

isCnpj(): boolean;

Defined in: value-objects/tax-id.ts:23

Returns

boolean


isCpf()

isCpf(): boolean;

Defined in: value-objects/tax-id.ts:18

Returns

boolean


padded()

padded(): string;

Defined in: value-objects/tax-id.ts:33

Returns

string


tagName()

tagName(): "CNPJ" | "CPF";

Defined in: value-objects/tax-id.ts:28

Returns

"CNPJ" | "CPF"


toString()

toString(): string;

Defined in: value-objects/tax-id.ts:45

Returns

string


toXmlTag()

toXmlTag(): string;

Defined in: value-objects/tax-id.ts:40

Returns

string

On this page