From 724b009a5696ae7b26525456c6d84c4b80e9a371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=BB=D0=B0?= Date: Wed, 18 Oct 2023 09:05:33 +0300 Subject: [PATCH] rename rejected_reason to rejection_reason --- v1/template.go | 2 +- v1/template_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v1/template.go b/v1/template.go index 4af249d..634181a 100644 --- a/v1/template.go +++ b/v1/template.go @@ -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"` } diff --git a/v1/template_test.go b/v1/template_test.go index 1caf975..4642a50 100644 --- a/v1/template_test.go +++ b/v1/template_test.go @@ -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)