Skip to content

Commit 746f004

Browse files
authored
Merge pull request #182 from Ecwid/products-search-request-improvements
Moved interface ApiRequest from ProductsSearchRequest's ancestors to class ProductsSearchRequest
2 parents 4009044 + 4e6f240 commit 746f004

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/dto/product/request/ProductsSearchRequest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package com.ecwid.apiclient.v3.dto.product.request
22

33
import com.ecwid.apiclient.v3.dto.ApiRequest
4-
import com.ecwid.apiclient.v3.dto.common.ApiRequestDTO
54
import com.ecwid.apiclient.v3.impl.RequestInfo
65
import java.util.*
76
import java.util.concurrent.TimeUnit
87

9-
sealed class ProductsSearchRequest : ApiRequestDTO {
8+
sealed class ProductsSearchRequest : ApiRequest {
109

1110
data class ByFilters(
1211
val keyword: String? = null,
@@ -31,7 +30,7 @@ sealed class ProductsSearchRequest : ApiRequestDTO {
3130
val offset: Int = 0,
3231
val limit: Int = 100,
3332
val lang: String? = null
34-
) : ProductsSearchRequest(), ApiRequest {
33+
) : ProductsSearchRequest() {
3534
override fun toRequestInfo() = RequestInfo.createGetRequest(
3635
pathSegments = listOf(
3736
"products"
@@ -76,7 +75,7 @@ sealed class ProductsSearchRequest : ApiRequestDTO {
7675
}
7776
}
7877

79-
data class ByIds(val productIds: List<Int> = listOf()) : ProductsSearchRequest(), ApiRequest {
78+
data class ByIds(val productIds: List<Int> = listOf()) : ProductsSearchRequest() {
8079
override fun toRequestInfo() = RequestInfo.createGetRequest(
8180
pathSegments = listOf(
8281
"products"

0 commit comments

Comments
 (0)