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

Offen
#487 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
nodejs, typescript
Bereich
api

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
264
Forks
177
Ø Merge
10 Std. 5 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus XeroAPI/xero-node

Alle Issues in XeroAPI/xero-node

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.