From 268f642d60245fcf36cdaa38427d80e25991348d Mon Sep 17 00:00:00 2001 From: Guillermo Gutierrez Almazor Date: Wed, 20 Nov 2024 11:01:33 +0100 Subject: [PATCH] Change: support the `active` attribute in `EmailForward` --- dnsimple/domains_email_forwards.go | 1 + dnsimple/domains_email_forwards_test.go | 1 + fixtures.http/api/getEmailForward/success.http | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dnsimple/domains_email_forwards.go b/dnsimple/domains_email_forwards.go index 4ec567b..8cb6591 100644 --- a/dnsimple/domains_email_forwards.go +++ b/dnsimple/domains_email_forwards.go @@ -18,6 +18,7 @@ type EmailForward struct { // Deprecated: please use `DestinationEmail` instead. To string `json:"to,omitempty"` DestinationEmail string `json:"destination_email,omitempty"` + Active bool `json:"active,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` } diff --git a/dnsimple/domains_email_forwards_test.go b/dnsimple/domains_email_forwards_test.go index 47f3b4e..d660539 100644 --- a/dnsimple/domains_email_forwards_test.go +++ b/dnsimple/domains_email_forwards_test.go @@ -112,6 +112,7 @@ func TestDomainsService_GetEmailForward(t *testing.T) { AliasEmail: "example@dnsimple.xyz", To: "example@example.com", DestinationEmail: "example@example.com", + Active: true, CreatedAt: "2021-01-25T13:54:40Z", UpdatedAt: "2021-01-25T13:54:40Z"} assert.Equal(t, wantSingle, forward) diff --git a/fixtures.http/api/getEmailForward/success.http b/fixtures.http/api/getEmailForward/success.http index 1733c35..8d939e5 100644 --- a/fixtures.http/api/getEmailForward/success.http +++ b/fixtures.http/api/getEmailForward/success.http @@ -18,4 +18,4 @@ X-Permitted-Cross-Domain-Policies: none Content-Security-Policy: frame-ancestors 'none' Strict-Transport-Security: max-age=31536000 -{"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}} +{"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","active":true,"created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}}