-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffer.go
More file actions
58 lines (52 loc) · 1.35 KB
/
offer.go
File metadata and controls
58 lines (52 loc) · 1.35 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package shopgun
// Offer type
type Offer struct {
ID string `json:"id"`
Ern string `json:"ern"`
Heading string `json:"heading"`
Description string `json:"description"`
CatalogPage int `json:"catalog_page"`
Pricing `json:"pricing"`
Quantity `json:"quantity"`
Images Images `json:"images"`
Links struct {
Webshop interface{} `json:"webshop"`
} `json:"links"`
RunFrom Time `json:"run_from"`
RunTill Time `json:"run_till"`
DealerURL string `json:"dealer_url"`
StoreURL string `json:"store_url"`
CatalogURL string `json:"catalog_url"`
DealerID string `json:"dealer_id"`
StoreID string `json:"store_id"`
CatalogID string `json:"catalog_id"`
CategoryIds []string `json:"category_ids"`
Branding Branding `json:"branding"`
}
// Pricing type
type Pricing struct {
Price float64 `json:"price"`
PrePrice float64 `json:"pre_price"`
Currency string `json:"currency"`
}
// Quantity type
type Quantity struct {
Unit Unit `json:"unit"`
Size Range `json:"size"`
Pieces Range `json:"pieces"`
}
// Unit type
type Unit struct {
Symbol string `json:"symbol"`
Si Si `json:"si"`
}
// Si type
type Si struct {
Symbol string `json:"symbol"`
Factor float64 `json:"factor"`
}
// Range type
type Range struct {
From float64 `json:"from"`
To float64 `json:"to"`
}