diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt index 7bc1f3b0a..cf02da6ae 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/ApiClient.kt @@ -269,6 +269,7 @@ interface SalesChannelsApiClient { fun getYahooShoppingFeedConfig(request: YahooShoppingFeedConfigGetRequest): FetchedYahooShoppingFeedConfig fun getYandexMarketFeedConfig(request: YandexMarketFeedConfigGetRequest): FetchedYandexMarketFeedConfig fun getYandexMarketDbsFeedConfig(request: YandexMarketDbsFeedConfigGetRequest): FetchedYandexMarketDbsFeedConfig + fun getMetaOpenCatalogFeedConfig(request: MetaOpenCatalogFeedConfigGetRequest): FetchedMetaOpenCatalogFeedConfig } // Application diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/request/MetaOpenCatalogFeedConfigGetRequest.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/request/MetaOpenCatalogFeedConfigGetRequest.kt new file mode 100644 index 000000000..5e09a15a6 --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/request/MetaOpenCatalogFeedConfigGetRequest.kt @@ -0,0 +1,17 @@ +package com.ecwid.apiclient.v3.dto.saleschannels.request + +import com.ecwid.apiclient.v3.dto.ApiRequest +import com.ecwid.apiclient.v3.impl.RequestInfo +import com.ecwid.apiclient.v3.responsefields.ResponseFields + +data class MetaOpenCatalogFeedConfigGetRequest( + val responseFields: ResponseFields = ResponseFields.All, +) : ApiRequest { + override fun toRequestInfo() = RequestInfo.createGetRequest( + pathSegments = listOf( + "saleschannels", + "meta_open_catalog" + ), + responseFields = responseFields + ) +} diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/response/FetchedMetaOpenCatalogFeedConfig.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/response/FetchedMetaOpenCatalogFeedConfig.kt new file mode 100644 index 000000000..76a49e38e --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/saleschannels/response/FetchedMetaOpenCatalogFeedConfig.kt @@ -0,0 +1,14 @@ +package com.ecwid.apiclient.v3.dto.saleschannels.response + +import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO +import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO.ModifyKind +import com.ecwid.apiclient.v3.dto.saleschannels.MarketplaceConfig +import com.ecwid.apiclient.v3.dto.saleschannels.ProductFeedInfo + +data class FetchedMetaOpenCatalogFeedConfig( + val marketplaceConfig: MarketplaceConfig = MarketplaceConfig(), + val productFeedInfo: ProductFeedInfo = ProductFeedInfo() +) : ApiFetchedDTO { + + override fun getModifyKind() = ModifyKind.ReadOnly +} diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SalesChannelsApiClientImpl.kt b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SalesChannelsApiClientImpl.kt index 41b436569..335d80ac0 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/impl/SalesChannelsApiClientImpl.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/impl/SalesChannelsApiClientImpl.kt @@ -23,4 +23,7 @@ class SalesChannelsApiClientImpl( override fun getYandexMarketDbsFeedConfig(request: YandexMarketDbsFeedConfigGetRequest) = apiClientHelper.makeObjectResultRequest(request) + + override fun getMetaOpenCatalogFeedConfig(request: MetaOpenCatalogFeedConfigGetRequest) = + apiClientHelper.makeObjectResultRequest(request) }