gpt4 book ai didi

python - 如何获取客户的所有交易(python)

转载 作者:太空宇宙 更新时间:2023-11-03 17:54:06 25 4
gpt4 key购买 nike

我需要实现一个包含客户所有交易的页面。在 docs据报道,客户包含 transactions 属性,但在最新版本的 api (3.10.0) 中,情况并非如此。如何获取指定客户的所有交易?我还查看了API内部,特别是我发现在braintree.Transaction类中有方法search,但在文档中没有写如何使用它。

@staticmethod
def search(*query):
return Configuration.gateway().transaction.search(*query)

这个方法有用吗?

谢谢

最佳答案

我在布伦特里工作。感谢您发现文档中的错误。如果您需要更多帮助,请get in touch with our support team .

customer.transactions 方法是 Braintree 文档中的一个错误。您可以search for transactions using customer id :

search_results = braintree.Transaction.search(
braintree.TransactionSearch.customer_id == "the_customer_id"
)

关于python - 如何获取客户的所有交易(python),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28741100/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com