Unsetting Invoice Expected Payment Date

未关闭
#476 1 条评论 0 个 reaction 已指派 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 分钟
30 天内合并 PR
5

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

XeroAPI/xero-node 的其他 Issue

查看 XeroAPI/xero-node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。