From 937ea8cd0f1b24cba2e02e90aa57df52480c02e5 Mon Sep 17 00:00:00 2001 From: winrok Date: Thu, 3 Aug 2023 13:14:31 +0400 Subject: [PATCH] ECWID-124685 the datatype for groups has been changed to allow a list of ids to be passed --- .../v3/dto/customer/request/CustomersSearchRequest.kt | 4 ++-- .../kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersSearchRequest.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersSearchRequest.kt index 1d5d803ba..e9e7c61cd 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersSearchRequest.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/customer/request/CustomersSearchRequest.kt @@ -10,7 +10,7 @@ data class CustomersSearchRequest( val keyword: String? = null, val name: String? = null, val email: String? = null, - val customerGroupId: Int? = null, + val customerGroupId: String? = null, val minOrderCount: Int? = null, val maxOrderCount: Int? = null, val minSalesValue: Int? = null, @@ -62,7 +62,7 @@ data class CustomersSearchRequest( request.keyword?.let { put("keyword", it) } request.name?.let { put("name", it) } request.email?.let { put("email", it) } - request.customerGroupId?.let { put("customerGroup", it.toString()) } + request.customerGroupId?.let { put("customerGroup", it) } request.minOrderCount?.let { put("minOrderCount", it.toString()) } request.maxOrderCount?.let { put("maxOrderCount", it.toString()) } request.minSalesValue?.let { put("minSalesValue", it.toString()) } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt b/src/test/kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt index dc669863d..347f769f4 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt @@ -173,8 +173,8 @@ class CustomersTest : BaseEntityTest() { assertCustomersSearch( positiveCustomerId = customerCreateResult.id, - positiveSearchRequest = CustomersSearchRequest(customerGroupId = customerCreateRequest.newCustomer.customerGroupId), - negativeSearchRequest = CustomersSearchRequest(customerGroupId = 0) + positiveSearchRequest = CustomersSearchRequest(customerGroupId = customerCreateRequest.newCustomer.customerGroupId.toString()), + negativeSearchRequest = CustomersSearchRequest(customerGroupId = "0") ) assertCustomersSearch(