From ff8343b7b4505c15373ff844c34d1668c3f27e11 Mon Sep 17 00:00:00 2001 From: winrok Date: Mon, 10 Jun 2024 20:13:58 +0400 Subject: [PATCH] ECWID-138834 added parameters for searching orders --- .../ecwid/apiclient/v3/dto/order/request/OrdersSearchRequest.kt | 2 ++ .../v3/rule/nullablepropertyrules/OrdersSearchRequestRules.kt | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/OrdersSearchRequest.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/OrdersSearchRequest.kt index afba5ab6e..d9bfc93c8 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/OrdersSearchRequest.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/OrdersSearchRequest.kt @@ -23,6 +23,7 @@ data class OrdersSearchRequest( val customer: String? = null, val customerId: Int? = null, val email: String? = null, + val customerIdOrEmail: Boolean? = null, val paymentMethod: String? = null, val shippingMethod: String? = null, val paymentStatus: List? = null, @@ -60,6 +61,7 @@ data class OrdersSearchRequest( request.customer?.let { put("customer", it) } request.customerId?.let { put("customerId", it.toString()) } request.email?.let { put("email", it) } + request.customerIdOrEmail?.let { put("customerIdOrEmail", it.toString()) } request.paymentMethod?.let { put("paymentMethod", it) } request.shippingMethod?.let { put("shippingMethod", it) } request.paymentStatus?.let { put("paymentStatus", it.joinToString(",")) } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrdersSearchRequestRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrdersSearchRequestRules.kt index 20ed11a54..8092c0149 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrdersSearchRequestRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/OrdersSearchRequestRules.kt @@ -11,6 +11,7 @@ val ordersSearchRequestRequestNullablePropertyRules: List