Skip to content

Recipient ​

Datos del receptor de un documento.

En general no se instancia directo: se usan los constructores Recipient.person, Recipient.entity, Recipient.foreign, Recipient.notNominated, Recipient.government, Recipient.diplomatic o Recipient.fromClientId.

Constructors ​

Constructor ​

ts
new Recipient(options): Recipient;

Parameters ​

ParameterType
optionsRecipientOptions

Returns ​

Recipient

Properties ​

clientType ​

ts
readonly clientType: 
  | "person"
  | "entity"
  | "foreign_entity"
  | "not_nominated"
  | "diplomatic"
  | "government";

ruc ​

ts
readonly ruc: string;

socialName ​

ts
readonly socialName: string;

fantasyName ​

ts
readonly fantasyName: string | undefined;

isTaxPayer ​

ts
readonly isTaxPayer: boolean;

countryCode ​

ts
readonly countryCode: string;

city ​

ts
readonly city: City | undefined;

address ​

ts
readonly address: string | undefined;

houseNumber ​

ts
readonly houseNumber: number | undefined;

email ​

ts
readonly email: string | undefined;

phone ​

ts
readonly phone: string | undefined;

code ​

ts
readonly code: string | undefined;

clientId ​

ts
readonly clientId: number | undefined;

extra ​

ts
readonly extra: {
[key: string]: unknown;
};

Index Signature ​

ts
[key: string]: unknown

Methods ​

person() ​

ts
static person(options): Recipient;

Una persona física.

ruc es el RUC con dígito verificador, o la cédula si no es contribuyente.

Parameters ​

ParameterType
optionsRecipientCommon & { ruc: string; name: string; isTaxPayer?: boolean; }

Returns ​

Recipient


entity() ​

ts
static entity(options): Recipient;

Una empresa o entidad con RUC.

Parameters ​

ParameterType
optionsRecipientCommon & { ruc: string; socialName: string; isTaxPayer?: boolean; }

Returns ​

Recipient


foreign() ​

ts
static foreign(options): Recipient;

Un cliente del exterior.

Es el único tipo que puede llevar dirección sin códigos geográficos paraguayos.

Parameters ​

ParameterType
optionsRecipientCommon & { name: string; countryCode: string; documentNumber?: string; }

Returns ​

Recipient


notNominated() ​

ts
static notNominated(options?): Recipient;

Venta sin identificar al comprador.

Es la factura innominada del mostrador. Se puede nominar después con sd.invoices.nominate(id, clientId).

Parameters ​

ParameterType
optionsRecipientCommon

Returns ​

Recipient


government() ​

ts
static government(options): Recipient;

Un organismo del Estado.

Parameters ​

ParameterType
optionsRecipientCommon & { ruc: string; socialName: string; }

Returns ​

Recipient


diplomatic() ​

ts
static diplomatic(options): Recipient;

Una misión diplomática con exoneración fiscal.

Parameters ​

ParameterType
optionsRecipientCommon & { ruc: string; socialName: string; }

Returns ​

Recipient


fromClientId() ​

ts
static fromClientId(clientId, options): Recipient;

Un cliente ya cargado en SmartDoc, por su id.

Igual hay que dar los datos que van impresos en el documento; el id sirve para que SmartDoc lo asocie a su ficha.

Parameters ​

ParameterType
clientIdnumber
optionsRecipientOptions

Returns ​

Recipient


toApi() ​

ts
toApi(): {
[key: string]: unknown;
};

Los campos client* que espera la API.

Returns ​

ts
{
[key: string]: unknown;
}

validateFor() ​

ts
validateFor(allowedTypes): void;

Verifica que este tipo de receptor sirva para el documento.

Los recibos, por ejemplo, aceptan solo persona, entidad y extranjero.

Parameters ​

ParameterType
allowedTypesReadonlySet< | "person" | "entity" | "foreign_entity" | "not_nominated" | "diplomatic" | "government">

Returns ​

void