0
QuickBooks在線支付信息僅返回帶有ID的參考財產PaymentMethodRef。從QuickBooks Online獲取支付方式名稱
當從QBOE請求付款信息時,如何獲得付款方式名稱?
僅供參考,請在下方添加代碼。
這裏_paymentList [I] .PaymentMethodRef.name始終是空的,只有它會有_paymentList [I] .PaymentMethodRef.id。
ServiceContext serviceContext = getServiceContext(companyID, operatorID);
QueryService<Item> itemQueryService = new QueryService<Item>(serviceContext);
DataService service = new DataService(serviceContext);
Batch batch = service.CreateNewBatch();
ServiceQBOnline_Payment Payment_info;
batch.Add("select * from Payment where Id In " + TxnIds + " ORDERBY id startPosition " + BatchStartIdx + " MaxResults 100", "bID1");
batch.Execute();
intuitBatchResponse queryCustomerResponse = batch["bID1"];
if (queryCustomerResponse.ResponseType == ResponseType.Query)
{
List<Payment> _paymentList = queryCustomerResponse.Entities.ToList().ConvertAll(item => item as Payment);
Response.PaymentExportSuccessList = new List<ServiceQBOnline_Payment>();
for (int i = 0; i < _paymentList.Count; i++)
{
Payment_info.PaymentMethod = _paymentList[i].PaymentMethodRef == null ? "" : _paymentList[i].PaymentMethodRef.name;
Response.PaymentExportSuccessList.Add(Payment_info);
}