Repository: mailgun/mailgun-go (go)

Issue:
Verify Domain API implementation missing
The implementation for the [verify domain api](https://documentation.mailgun.com/en/latest/user_manual.html#verifying-your-domain) seems to be missing from the library.
There's no way currently to verify the domain dns records after adding a new domain to change the domain state from unverified to active

Pull request description:
Verify domain API
Should close #156 

Patch:
diff --git a/domains.go b/domains.go
index 7e9f069..b1694c9 100644
--- a/domains.go
+++ b/domains.go
@@ -241,6 +241,17 @@ func (mg *MailgunImpl) GetDomain(ctx context.Context, domain string) (DomainResp
 	return resp, err
 }
 
+func (mg *MailgunImpl) VerifyDomain(ctx context.Context, domain string) (string, error) {
+	r := newHTTPRequest(generatePublicApiUrl(mg, domainsEndpoint) + "/" + domain + "/verify")
+	r.setClient(mg.Client())
+	r.setBasicAuth(basicAuthUser, mg.APIKey())
+
+	payload := newUrlEncodedPayload()
+	var resp DomainResponse
+	err := putResponseFromJSON(ctx, r, payload, &resp)
+	return resp.Domain.State, err
+}
+
 // Optional parameters when creating a domain
 type CreateDomainOptions struct {
 	SpamAction         SpamAction


Test patch:
diff --git a/domains_test.go b/domains_test.go
index 3353470..09f70bc 100644
--- a/domains_test.go
+++ b/domains_test.go
@@ -118,3 +118,12 @@ func TestDomainTracking(t *testing.T) {
 	ensure.DeepEqual(t, info.Click.Active, true)
 	ensure.DeepEqual(t, info.Open.Active, true)
 }
+
+func TestDomainVerify(t *testing.T) {
+	mg := mailgun.NewMailgun(testDomain, testKey)
+	mg.SetAPIBase(server.URL())
+	ctx := context.Background()
+
+	_, err := mg.VerifyDomain(ctx, testDomain)
+	ensure.Nil(t, err)
+}