Added the prices.price_strategy_enabled parameter to the method request
This commit is contained in:
@@ -492,3 +492,16 @@ const (
|
|||||||
// surplus certificate
|
// surplus certificate
|
||||||
DigitalActTypeOfExcess DigitalActType = "act_of_excess"
|
DigitalActTypeOfExcess DigitalActType = "act_of_excess"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PriceStrategy string
|
||||||
|
|
||||||
|
const (
|
||||||
|
// enable
|
||||||
|
PriceStrategyEnabled PriceStrategy = "ENABLED"
|
||||||
|
|
||||||
|
// disable
|
||||||
|
PriceStrategyDisabled PriceStrategy = "DISABLED"
|
||||||
|
|
||||||
|
// don't change anything. Default value
|
||||||
|
PriceStrategyUnknown PriceStrategy = "UNKNOWN"
|
||||||
|
)
|
||||||
|
|||||||
@@ -655,6 +655,15 @@ type UpdatePricesPrice struct {
|
|||||||
// If the current price of the product is from 400 to 10 000 rubles inclusive, the difference between the values of price and old_price fields should be more than 5%, but not less than 20 rubles.
|
// If the current price of the product is from 400 to 10 000 rubles inclusive, the difference between the values of price and old_price fields should be more than 5%, but not less than 20 rubles.
|
||||||
Price string `json:"price"`
|
Price string `json:"price"`
|
||||||
|
|
||||||
|
// Attribute for enabling and disabling pricing strategies auto-application
|
||||||
|
//
|
||||||
|
// If you've previously enabled automatic application of pricing strategies and don't want to disable it, pass UNKNOWN in the next requests.
|
||||||
|
//
|
||||||
|
// If you pass `ENABLED` in this parameter, pass `strategy_id` in the `/v1/pricing-strategy/products/add` method request.
|
||||||
|
//
|
||||||
|
// If you pass `DISABLED` in this parameter, the product is removed from the strategy
|
||||||
|
PriceStrategyEnabled PriceStrategy `json:"price_strategy_enabled"`
|
||||||
|
|
||||||
// Product identifier
|
// Product identifier
|
||||||
ProductId int64 `json:"product_id"`
|
ProductId int64 `json:"product_id"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,12 +448,13 @@ func TestUpdatePrices(t *testing.T) {
|
|||||||
&UpdatePricesParams{
|
&UpdatePricesParams{
|
||||||
Prices: []UpdatePricesPrice{
|
Prices: []UpdatePricesPrice{
|
||||||
{
|
{
|
||||||
AutoActionEnabled: "UNKNOWN",
|
AutoActionEnabled: "UNKNOWN",
|
||||||
CurrencyCode: "RUB",
|
CurrencyCode: "RUB",
|
||||||
MinPrice: "800",
|
MinPrice: "800",
|
||||||
OldPrice: "0",
|
OldPrice: "0",
|
||||||
Price: "1448",
|
Price: "1448",
|
||||||
ProductId: 1386,
|
ProductId: 1386,
|
||||||
|
PriceStrategyEnabled: PriceStrategyUnknown,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user