Skip to content

Commit

Permalink
Merge pull request #424 from Ecwid/ECWID-136865
Browse files Browse the repository at this point in the history
ECWID-136865 Use pre calculated order count for customers api
  • Loading branch information
winrokru authored Aug 7, 2024
2 parents 1afd5e7 + be8e873 commit 804bef0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class CustomersSearchRequest(
val name: String? = null,
val email: String? = null,
val customerGroupId: Int? = null,
val usePrecalculatedOrderCount: Boolean? = null,
val minOrderCount: Int? = null,
val maxOrderCount: Int? = null,
val minSalesValue: Int? = null,
Expand Down Expand Up @@ -70,6 +71,7 @@ data class CustomersSearchRequest(
request.name?.let { put("name", it) }
request.email?.let { put("email", it) }
request.customerGroupId?.let { put("customerGroup", it.toString()) }
request.usePrecalculatedOrderCount?.let { put("usePrecalculatedOrderCount", it.toString()) }
request.minOrderCount?.let { put("minOrderCount", it.toString()) }
request.maxOrderCount?.let { put("maxOrderCount", it.toString()) }
request.minSalesValue?.let { put("minSalesValue", it.toString()) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ val customersSearchRequestNullablePropertyRules: List<NullablePropertyRule<*, *>
AllowNullable(CustomersSearchRequest::customerGroupId),
AllowNullable(CustomersSearchRequest::email),
AllowNullable(CustomersSearchRequest::keyword),
AllowNullable(CustomersSearchRequest::usePrecalculatedOrderCount),
AllowNullable(CustomersSearchRequest::maxOrderCount),
AllowNullable(CustomersSearchRequest::minOrderCount),
AllowNullable(CustomersSearchRequest::maxSalesValue),
Expand Down

0 comments on commit 804bef0

Please sign in to comment.