Unsetting Invoice Expected Payment Date

Offen
#476 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@RettBehrens arbeitet bereits daran.

Seit 01.3.2021.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Priority: Low Status: Accepted Type: Bug - Investigating

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

  • Version 4.7.3

Describe the bug
I can't seem to be able to unset an invoice's expected payment date.

To Reproduce
Steps to reproduce the behavior:

xeroCLient.accountingApi.updateInvoice(tenantID, invoiceID, {
  invoices: [{ expectedPaymentDate: '' }]
})

Expected behavior
The expectedPaymentDate should be cleared.

Additional context
To be fair, this appears to be more of a Xero API issue/design decision. However, I did manage to clear the EPD calling the API directly, using ExpectedPaymentDateString.

curl --request POST \
  --url https://api.xero.com/api.xro/2.0/Invoices/b7b20c66-5844-4dac-b855-dd043f15e795 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer ...' \
  --header 'Content-Type: application/json' \
  --header 'xero-tenant-id: tenant-id' \
  --data '{
	"Invoices": [{
		"ExpectedPaymentDateString": ""
	}]
}'

Using ExpectedPaymentDateString clears the EPD in Xero, while using ExpectedPaymentDate does not.

In invoice.ts, an entry can be added in the attributeTypeMap to allow updates to the ExpectedPaymentDateString property.

What are your thoughts on this?

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.