-
Notifications
You must be signed in to change notification settings - Fork 5
/
template.go
53 lines (46 loc) · 1.3 KB
/
template.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package whatsapp
type TextBasedTemplate struct {
Name string `json:"name"`
Language Language `json:"language"`
Components []ComponentText `json:"components"`
Type string `json:"type"`
api *API
}
type MultiBasedTemplate struct {
Name string `json:"name"`
Language Language `json:"language"`
Components []ComponentMedia `json:"components"`
Type string `json:"type"`
api *API
}
type Language struct {
Code string `json:"code"`
}
type ComponentText struct {
Type string `json:"type"`
Parameters []ParameterText `json:"parameters"`
}
type ComponentMedia struct {
Type string `json:"type"`
Parameters []ParameterMedia `json:"parameters"`
}
type ParameterMedia struct {
Type string `json:"type"`
Image struct {
Link string `json:"link"`
} `json:"image,omitempty"`
}
type ParameterText struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
Currency Currency `json:"currency,omitempty"`
DateTime DateTime `json:"date_time,omitempty"`
}
type Currency struct {
FallbackValue string `json:"fallback_value"`
Code string `json:"code"`
Amount1000 int `json:"amount_1000"`
}
type DateTime struct {
FallbackValue string `json:"fallback_value"`
}