Unsetting Invoice Expected Payment Date

Ouverte
#476 1 commentaire 0 réactions 1 personne assignée Voir sur GitHub

@RettBehrens y travaille déjà.

Depuis le 1/3/2021.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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?

Langage dominant
TypeScript
Étoiles
264
Forks
177
Merge moyen
10 h 5 min
PR mergées (30 j)
5

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de XeroAPI/xero-node

Toutes les issues de XeroAPI/xero-node

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.