diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt index 99bcb7731..4968d6e91 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt @@ -44,7 +44,7 @@ import com.ecwid.apiclient.v3.dto.subscriptions.request.SubscriptionsSearchReque import com.ecwid.apiclient.v3.dto.subscriptions.result.FetchedSubscription import com.ecwid.apiclient.v3.dto.subscriptions.result.SubscriptionsSearchResult import com.ecwid.apiclient.v3.dto.swatches.request.RecentSwatchColorsGetRequest -import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColor +import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColorsResult import com.ecwid.apiclient.v3.dto.variation.request.* import com.ecwid.apiclient.v3.dto.variation.result.* import com.ecwid.apiclient.v3.httptransport.HttpTransport @@ -324,5 +324,5 @@ interface ProductReviewsApiClient { // Swatches interface SwatchesApiClient { - fun getRecentSwatchColors(request: RecentSwatchColorsGetRequest): Sequence + fun getRecentSwatchColors(request: RecentSwatchColorsGetRequest): FetchedSwatchColorsResult } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColorsResult.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColorsResult.kt new file mode 100644 index 000000000..3d2173cb0 --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/swatches/result/FetchedSwatchColorsResult.kt @@ -0,0 +1,7 @@ +package com.ecwid.apiclient.v3.dto.swatches.result + +import com.ecwid.apiclient.v3.dto.common.ApiResultDTO + +data class FetchedSwatchColorsResult( + val colors: List = listOf(), +) : ApiResultDTO diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SwatchesApiClientImpl.kt b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SwatchesApiClientImpl.kt index c4bfb1b13..fcea01c3b 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SwatchesApiClientImpl.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SwatchesApiClientImpl.kt @@ -4,11 +4,12 @@ import com.ecwid.apiclient.v3.ApiClientHelper import com.ecwid.apiclient.v3.SwatchesApiClient import com.ecwid.apiclient.v3.dto.swatches.request.RecentSwatchColorsGetRequest import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColor +import com.ecwid.apiclient.v3.dto.swatches.result.FetchedSwatchColorsResult class SwatchesApiClientImpl( private val apiClientHelper: ApiClientHelper, ) : SwatchesApiClient { override fun getRecentSwatchColors(request: RecentSwatchColorsGetRequest) = - apiClientHelper.makeObjectResultRequest>(request) + apiClientHelper.makeObjectResultRequest(request) }