如何调用 Magento SOAP API v2 以获取 vb.net 中一组日期之间的所有销售订单?
到目前为止,这是我尝试过的,但0
尽管存在销售订单,但它仍会返回销售订单。
Dim ae As associativeEntity = New associativeEntity()
ae.key = "status"
ae.value = "processing"
Dim params As filters = New filters
Dim dateFilter As complexFilter
dateFilter = New complexFilter()
dateFilter.key = "created_at"
Dim nestedFilterFrom As associativeMultiEntity = New associativeMultiEntity()
nestedFilterFrom.key = "gteq"
nestedFilterFrom.value = New String() {DateTime.Parse(fromDate).ToUniversalTime.ToString()}
dateFilter.value = nestedFilterFrom
Dim dateToFilter As complexFilter = New complexFilter()
Dim nestedFilterTo As associativeMultiEntity = New associativeMultiEntity()
nestedFilterTo.key = "lteq"
nestedFilterTo.value = New String() {DateTime.Parse(toDate).ToUniversalTime.ToString()}
dateToFilter.key = "created_at"
dateToFilter.value = nestedFilterTo
params.complex_filter = New complexFilter() {dateFilter, dateToFilter}
magentoWS.salesOrderList(sessionID, params)
我已经能够获得相同的代码来匹配状态,如下所示。
Dim ae As associativeEntity = New associativeEntity
Dim params As filters = New filters()
ae.key = "status"
ae.value = "processing"
params.filter = New associativeEntity() {ae}
magentoWS.salesOrderList(sessionID, params)