Skip to content

Commit 387af0e

Browse files
committed
add pricing strategy methods
1 parent c1e7f2b commit 387af0e

File tree

4 files changed

+1073
-0
lines changed

4 files changed

+1073
-0
lines changed

ozon/common.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,20 @@ const (
360360
OperationMarketplaceWithHoldingForUndeliverableGoods DetailsOtherItemName = "OperationMarketplaceWithHoldingForUndeliverableGoods"
361361
OperationClaim DetailsOtherItemName = "OperationClaim"
362362
)
363+
364+
type StrategyType string
365+
366+
const (
367+
MinExtPrice StrategyType = "MIN_EXT_PRICE"
368+
CompPrice StrategyType = "COMP_PRICE"
369+
)
370+
371+
type StrategyUpdateType string
372+
373+
const (
374+
StrategyEnabled StrategyUpdateType = "strategyEnabled"
375+
StrategyDisabled StrategyUpdateType = "strategyDisabled"
376+
StrategyChanged StrategyUpdateType = "strategyChanged"
377+
StrategyCreated StrategyUpdateType = "strategyCreated"
378+
StrategyItemsListChanged StrategyUpdateType = "strategyItemsListChanged"
379+
)

ozon/ozon.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type Client struct {
3030
brands *Brands
3131
chats *Chats
3232
certificates *Certificates
33+
strategies *Strategies
3334
}
3435

3536
func (c Client) Analytics() *Analytics {
@@ -100,6 +101,10 @@ func (c Client) Certificates() *Certificates {
100101
return c.certificates
101102
}
102103

104+
func (c Client) Strategies() *Strategies {
105+
return c.strategies
106+
}
107+
103108
func NewClient(clientId, apiKey string) *Client {
104109
coreClient := core.NewClient(DefaultAPIBaseUrl, map[string]string{
105110
"Client-Id": clientId,
@@ -125,6 +130,7 @@ func NewClient(clientId, apiKey string) *Client {
125130
brands: &Brands{client: coreClient},
126131
chats: &Chats{client: coreClient},
127132
certificates: &Certificates{client: coreClient},
133+
strategies: &Strategies{client: coreClient},
128134
}
129135
}
130136

@@ -150,5 +156,6 @@ func NewMockClient(handler http.HandlerFunc) *Client {
150156
brands: &Brands{client: coreClient},
151157
chats: &Chats{client: coreClient},
152158
certificates: &Certificates{client: coreClient},
159+
strategies: &Strategies{client: coreClient},
153160
}
154161
}

0 commit comments

Comments
 (0)