Skip to content

Commit ce111c8

Browse files
authored
Merge pull request #389 from Ecwid/ECWID-136424-reviews-api
ECWID-136424 Product reviews: review list page. Added filtering reviews by several rating values
2 parents 495cc1b + 2ed470e commit ce111c8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/dto/productreview/request/ProductReviewMassUpdate.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ data class ProductReviewMassUpdate(
1414
) : ApiRequestDTO {
1515

1616
data class Filters(
17-
val reviewId: String? = null,
18-
val productId: String? = null,
19-
val orderId: String? = null,
17+
val reviewId: List<Long>? = null,
18+
val productId: List<Long>? = null,
19+
val orderId: List<Long>? = null,
2020
val status: ProductReviewStatus? = null,
21-
val rating: Int? = null,
21+
val rating: List<Int>? = null,
2222
val createdFrom: Instant? = null,
2323
val createdTo: Instant? = null,
2424
val searchKeyword: String? = null,

src/main/kotlin/com/ecwid/apiclient/v3/dto/productreview/request/ProductReviewSearchRequest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ data class ProductReviewSearchRequest(
1414
val productId: String? = null,
1515
val orderId: String? = null,
1616
val status: ProductReviewStatus? = null,
17-
val rating: Int? = null,
17+
val rating: String? = null,
1818
val createdFrom: Instant? = null,
1919
val createdTo: Instant? = null,
2020
val updatedFrom: Instant? = null,
@@ -40,7 +40,7 @@ data class ProductReviewSearchRequest(
4040
request.productId?.let { put("productId", it) }
4141
request.orderId?.let { put("orderId", it) }
4242
request.status?.let { put("status", it.toString()) }
43-
request.rating?.let { put("rating", it.toString()) }
43+
request.rating?.let { put("rating", it) }
4444
request.createdFrom?.let { put("createdFrom", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }
4545
request.createdTo?.let { put("createdTo", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }
4646
request.updatedFrom?.let { put("updatedFrom", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }

0 commit comments

Comments
 (0)