feat: shit shit
This commit is contained in:
304
pkg/api/yandex/ymclient/docs/PromosAPI.md
Normal file
304
pkg/api/yandex/ymclient/docs/PromosAPI.md
Normal file
@@ -0,0 +1,304 @@
|
||||
# \PromosAPI
|
||||
|
||||
All URIs are relative to *https://api.partner.market.yandex.ru*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**DeletePromoOffers**](PromosAPI.md#DeletePromoOffers) | **Post** /businesses/{businessId}/promos/offers/delete | Удаление товаров из акции
|
||||
[**GetPromoOffers**](PromosAPI.md#GetPromoOffers) | **Post** /businesses/{businessId}/promos/offers | Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
[**GetPromos**](PromosAPI.md#GetPromos) | **Post** /businesses/{businessId}/promos | Получение списка акций
|
||||
[**UpdatePromoOffers**](PromosAPI.md#UpdatePromoOffers) | **Post** /businesses/{businessId}/promos/offers/update | Добавление товаров в акцию или изменение их цен
|
||||
|
||||
|
||||
|
||||
## DeletePromoOffers
|
||||
|
||||
> DeletePromoOffersResponse DeletePromoOffers(ctx, businessId).DeletePromoOffersRequest(deletePromoOffersRequest).Execute()
|
||||
|
||||
Удаление товаров из акции
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html])
|
||||
deletePromoOffersRequest := *openapiclient.NewDeletePromoOffersRequest("PromoId_example") // DeletePromoOffersRequest |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PromosAPI.DeletePromoOffers(context.Background(), businessId).DeletePromoOffersRequest(deletePromoOffersRequest).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PromosAPI.DeletePromoOffers``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `DeletePromoOffers`: DeletePromoOffersResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `PromosAPI.DeletePromoOffers`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**businessId** | **int64** | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiDeletePromoOffersRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**deletePromoOffersRequest** | [**DeletePromoOffersRequest**](DeletePromoOffersRequest.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DeletePromoOffersResponse**](DeletePromoOffersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKey](../README.md#ApiKey), [OAuth](../README.md#OAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## GetPromoOffers
|
||||
|
||||
> GetPromoOffersResponse GetPromoOffers(ctx, businessId).GetPromoOffersRequest(getPromoOffersRequest).PageToken(pageToken).Limit(limit).Execute()
|
||||
|
||||
Получение списка товаров, которые участвуют или могут участвовать в акции
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html])
|
||||
getPromoOffersRequest := *openapiclient.NewGetPromoOffersRequest("PromoId_example") // GetPromoOffersRequest |
|
||||
pageToken := "eyBuZXh0SWQ6IDIzNDIgfQ==" // string | Идентификатор страницы c результатами. Если параметр не указан, возвращается первая страница. Рекомендуем передавать значение выходного параметра :no-translate[`nextPageToken`], полученное при последнем запросе. Если задан :no-translate[`page_token`] и в запросе есть параметры :no-translate[`page`] и :no-translate[`pageSize`], они игнорируются. (optional)
|
||||
limit := int32(20) // int32 | Количество значений на одной странице. (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PromosAPI.GetPromoOffers(context.Background(), businessId).GetPromoOffersRequest(getPromoOffersRequest).PageToken(pageToken).Limit(limit).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PromosAPI.GetPromoOffers``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetPromoOffers`: GetPromoOffersResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `PromosAPI.GetPromoOffers`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**businessId** | **int64** | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetPromoOffersRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**getPromoOffersRequest** | [**GetPromoOffersRequest**](GetPromoOffersRequest.md) | |
|
||||
**pageToken** | **string** | Идентификатор страницы c результатами. Если параметр не указан, возвращается первая страница. Рекомендуем передавать значение выходного параметра :no-translate[`nextPageToken`], полученное при последнем запросе. Если задан :no-translate[`page_token`] и в запросе есть параметры :no-translate[`page`] и :no-translate[`pageSize`], они игнорируются. |
|
||||
**limit** | **int32** | Количество значений на одной странице. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GetPromoOffersResponse**](GetPromoOffersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKey](../README.md#ApiKey), [OAuth](../README.md#OAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## GetPromos
|
||||
|
||||
> GetPromosResponse GetPromos(ctx, businessId).GetPromosRequest(getPromosRequest).Execute()
|
||||
|
||||
Получение списка акций
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html])
|
||||
getPromosRequest := *openapiclient.NewGetPromosRequest() // GetPromosRequest | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PromosAPI.GetPromos(context.Background(), businessId).GetPromosRequest(getPromosRequest).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PromosAPI.GetPromos``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetPromos`: GetPromosResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `PromosAPI.GetPromos`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**businessId** | **int64** | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetPromosRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**getPromosRequest** | [**GetPromosRequest**](GetPromosRequest.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GetPromosResponse**](GetPromosResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKey](../README.md#ApiKey), [OAuth](../README.md#OAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## UpdatePromoOffers
|
||||
|
||||
> UpdatePromoOffersResponse UpdatePromoOffers(ctx, businessId).UpdatePromoOffersRequest(updatePromoOffersRequest).Execute()
|
||||
|
||||
Добавление товаров в акцию или изменение их цен
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html])
|
||||
updatePromoOffersRequest := *openapiclient.NewUpdatePromoOffersRequest("PromoId_example", []openapiclient.UpdatePromoOfferDTO{*openapiclient.NewUpdatePromoOfferDTO("OfferId_example")}) // UpdatePromoOffersRequest |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PromosAPI.UpdatePromoOffers(context.Background(), businessId).UpdatePromoOffersRequest(updatePromoOffersRequest).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PromosAPI.UpdatePromoOffers``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `UpdatePromoOffers`: UpdatePromoOffersResponse
|
||||
fmt.Fprintf(os.Stdout, "Response from `PromosAPI.UpdatePromoOffers`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**businessId** | **int64** | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]). ℹ️ [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiUpdatePromoOffersRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**updatePromoOffersRequest** | [**UpdatePromoOffersRequest**](UpdatePromoOffersRequest.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UpdatePromoOffersResponse**](UpdatePromoOffersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKey](../README.md#ApiKey), [OAuth](../README.md#OAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
Reference in New Issue
Block a user