add rejected_reason and verification_status fields for template
This commit is contained in:
parent
bb843a6361
commit
35957ff156
@ -37,17 +37,19 @@ var templateVarAssoc = map[string]interface{}{
|
||||
|
||||
// Template struct.
|
||||
type Template struct {
|
||||
Code string `json:"code"`
|
||||
ChannelID uint64 `json:"channel_id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Template []TemplateItem `json:"template"`
|
||||
HeaderParams *HeaderParams `json:"headerParams,omitempty"`
|
||||
Footer *string `json:"footer,omitempty"`
|
||||
ButtonParams []ButtonParam `json:"buttonParams,omitempty"`
|
||||
Lang string `json:"lang,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
Code string `json:"code"`
|
||||
ChannelID uint64 `json:"channel_id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Template []TemplateItem `json:"template"`
|
||||
HeaderParams *HeaderParams `json:"headerParams,omitempty"`
|
||||
Footer *string `json:"footer,omitempty"`
|
||||
ButtonParams []ButtonParam `json:"buttonParams,omitempty"`
|
||||
Lang string `json:"lang,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
RejectedReason string `json:"rejected_reason,omitempty"`
|
||||
VerificationStatus string `json:"verification_status,omitempty"`
|
||||
}
|
||||
|
||||
// TemplateItem is a part of template.
|
||||
|
@ -89,7 +89,9 @@ func TestUnmarshalMediaInteractiveTemplate(t *testing.T) {
|
||||
"type": "QUICK_REPLY",
|
||||
"text": "Yes"
|
||||
}
|
||||
]
|
||||
],
|
||||
"rejected_reason": "NONE",
|
||||
"status": "APPROVED"
|
||||
}`
|
||||
assert.NoError(t, json.Unmarshal([]byte(input), &template))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user