Unsetting Invoice Expected Payment Date

オープン
#476 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@RettBehrens がすでに取り組んでいます。

2021年3月1日 から。

評価

この issue はまだ評価されていません。

説明

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?

主要言語
TypeScript
スター
264
フォーク
177
平均マージ
10時間 5分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

XeroAPI/xero-node のほかの issue

XeroAPI/xero-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。