Invoice field `date` and `dueDate` not matching typescript definition

Abierto
#487 5 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
nodejs, typescript
Área
api

Línea de trabajo

The mismatch is between the Invoice model's date and dueDate properties, typed as string, and the Date instances that getInvoice and createInvoices return at runtime. Start from the Invoice model declaration and from where the SDK deserializes API responses, then compare what each call actually returns. Done means the declared types and the runtime values agree, with a test covering both calls. The thread has gone unanswered for about 300 days, so confirm the maintainers' preferred direction before you start.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

SDK you're using (please complete the following information):

  • Version: 4.9.1

Describe the bug

The Invoice model in TypeScript is not matching the actual invoice entities returned by the SDK.

In the typescript definition:

    /**
    * Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
    */
    'date'?: string;
    /**
    * Date invoice is due – YYYY-MM-DD
    */
    'dueDate'?: string;

If you look to the result of createInvoices (Date instance):
image

To Reproduce
Steps to reproduce the behavior:

  1. Do a getInvoice or createInvoices call

Expected behavior

  • date field to be a string
Lenguaje dominante
TypeScript
Estrellas
264
Forks
177
Merge medio
10 h 5 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de XeroAPI/xero-node

Todos los issues de XeroAPI/xero-node

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.