Skip to content

The "date" property on returned invoices has a TypeScript type of "string" but is in fact a "Date" #746

@andrew-rheingans

Description

@andrew-rheingans

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

  • Version 10.0.0

Describe the bug
When making a paged request for Invoices, the "date" property on returned invoices has a TypeScript type of "string" but is in fact a "Date". I think string is preferable since there can be timezone ambiguity with Date - for example, was the date string parsed in the context of the server timezone (using standard Date() constructor) or was it parsed using Date.UTC(). Also, thee same thing seems to be happening with the "dueDate" as well as the date on payments.

To Reproduce
Steps to reproduce the behavior:

  1. Fetch a paged list of invoices
  2. See that Invoice.date is actually a date - but it should be a string

Expected behavior
The date property should be a string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions