add new fields to the ActivateTemplateRequest
This commit is contained in:
commit
9f3cda8be6
@ -367,6 +367,8 @@ func (t *MGClientTest) Test_ActivateTemplate() {
|
||||
Text: "!",
|
||||
},
|
||||
},
|
||||
RejectionReason: "",
|
||||
VerificationStatus: "approved",
|
||||
}
|
||||
|
||||
defer gock.Off()
|
||||
|
@ -48,7 +48,7 @@ type Template struct {
|
||||
ButtonParams []ButtonParam `json:"buttonParams,omitempty"`
|
||||
Lang string `json:"lang,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
RejectedReason string `json:"rejected_reason,omitempty"`
|
||||
RejectionReason string `json:"rejection_reason,omitempty"`
|
||||
VerificationStatus string `json:"verification_status,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,7 @@ func TestUnmarshalMediaInteractiveTemplate(t *testing.T) {
|
||||
"text": "Yes"
|
||||
}
|
||||
],
|
||||
"rejected_reason": "NONE",
|
||||
"status": "APPROVED"
|
||||
"verification_status": "approved"
|
||||
}`
|
||||
assert.NoError(t, json.Unmarshal([]byte(input), &template))
|
||||
|
||||
@ -101,6 +100,7 @@ func TestUnmarshalMediaInteractiveTemplate(t *testing.T) {
|
||||
assert.Equal(t, "http://example.com/intaro/d2222", template.HeaderParams.VideoURL)
|
||||
assert.Equal(t, "http://example.com/intaro/d4444", template.HeaderParams.DocumentURL)
|
||||
assert.Equal(t, "Scooter", *template.Footer)
|
||||
assert.Equal(t, "approved", template.VerificationStatus)
|
||||
assert.Equal(t, URLButton, template.ButtonParams[0].ButtonType)
|
||||
assert.Equal(t, "222ddd", template.ButtonParams[0].URLParameter)
|
||||
assert.Equal(t, QuickReplyButton, template.ButtonParams[1].ButtonType)
|
||||
|
@ -564,6 +564,8 @@ type ActivateTemplateRequest struct {
|
||||
Template []TemplateItem `json:"template"`
|
||||
Lang string `json:"lang,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
RejectionReason string `json:"rejection_reason,omitempty"`
|
||||
VerificationStatus string `json:"verification_status,omitempty"`
|
||||
}
|
||||
|
||||
var ErrInvalidOriginator = errors.New("invalid originator")
|
||||
|
Loading…
Reference in New Issue
Block a user