-
Notifications
You must be signed in to change notification settings - Fork 4
/
webhook_stock.go
36 lines (30 loc) · 1.27 KB
/
webhook_stock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package moysklad
import (
"github.com/google/uuid"
)
// WebhookStock Вебхук на изменение остатков.
// Ключевое слово: webhookstock
// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-vebhuk-na-izmenenie-ostatkow
type WebhookStock struct {
AccountID *uuid.UUID `json:"accountId,omitempty"`
AuthorApplication *Meta `json:"authorApplication,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
StockType *string `json:"stockType,omitempty"`
ReportUrl *string `json:"reportUrl,omitempty"`
ID *uuid.UUID `json:"id,omitempty"`
Meta *Meta `json:"meta,omitempty"`
URL *string `json:"url,omitempty"`
ReportType WebhookReport `json:"reportType,omitempty"`
}
func (w WebhookStock) String() string {
return Stringify(w)
}
func (w WebhookStock) MetaType() MetaType {
return MetaTypeWebhookStock
}
// WebhookReport Тип отчета остатков, к которым привязан вебхук на изменение остатков
type WebhookReport string
const (
WebhookReportAll WebhookReport = "all"
WebhookReportByStore WebhookReport = "bystore"
)