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(